pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@postgresql.org
Cc: veera.sareddy@gmail.com
Subject: setweight is not working for me. Need some advice
Date: Sun, 24 Dec 2017 01:01:23 +0000
Message-ID: <20171224010123.826.74478@wrigleys.postgresql.org> (raw)

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/8.3/static/textsearch-controls.html
Description:

Its not giving the appropriate results:

I want to search within 2 columns (psc_code &amp; psc_name). I want to retrieve
the psc_code data first and then I should display the psc_name data.

I created new index, function &amp; trigger with setweight.. but no desired
result.

Here is my query :  Am I missig something . ?

SELECT refpsc.* FROM
		iae_reference.ref_product_service_code refpsc
	WHERE  1=1 
	AND refpsc.active_ind=&#39;Y&#39; 
	AND  setweight(to_tsvector(&#39;public.english_nostop&#39;,refpsc.psc_code), &#39;A&#39;)
|| &#39; 
	&#39; ||  setweight(to_tsvector(&#39;public.english_nostop&#39;,refpsc.psc_name), &#39;B&#39;) 
 @@ to_tsquery(&#39;public.english_nostop&#39;,&#39;AA17:*&#39;)  LIMIT 100


Message-ID: <20171224010123.826.74478@wrigleys.postgresql.org>
Permalink:  ../20171224010123.826.74478@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20171224010123.826.74478@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: noreply@postgresql.org, veera.sareddy@gmail.com
  Subject: Re: setweight is not working for me. Need some advice
  In-Reply-To: <20171224010123.826.74478@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox