From: | PG Doc comments form <noreply(at)postgresql(dot)org> |
---|---|
To: | pgsql-docs(at)postgresql(dot)org |
Cc: | veera(dot)sareddy(at)gmail(dot)com |
Subject: | setweight is not working for me. Need some advice |
Date: | 2017-12-24 01:01:23 |
Message-ID: | 20171224010123.826.74478@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
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
From | Date | Subject | |
---|---|---|---|
Next Message | PG Doc comments form | 2017-12-26 12:10:54 | Rolycore |
Previous Message | Alvaro Herrera | 2017-12-22 14:53:22 | Re: remove endterms and title ids |