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 & 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 & 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='Y'
AND setweight(to_tsvector('public.english_nostop',refpsc.psc_code), 'A')
|| '
' || setweight(to_tsvector('public.english_nostop',refpsc.psc_name), 'B')
@@ to_tsquery('public.english_nostop','AA17:*') LIMIT 100
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