From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Ritanjali Majihee <rmajhee(at)247headhunting(dot)com> |
Cc: | pgsql-general General <pgsql-general(at)postgresql(dot)org>, "Ambiger, Mahantesh" <mambiger(at)ibs(dot)com>, mahantesh(dot)ambiger(at)yahoo(dot)com |
Subject: | Re: Full text search with more than one word |
Date: | 2019-01-18 15:15:25 |
Message-ID: | CABUevExqNyhcOG8iEQimpwZOso=05tYHhA3cbcjas=WgFy6EVg@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
(please don't top-post on the postgresql mailinglists)
On Fri, Jan 18, 2019 at 3:57 PM Ritanjali Majihee <
rmajhee(at)247headhunting(dot)com> wrote:
> Hi Magnus,
>
>
>
> exact Search keyword is ("Marketing Coordinator" OR "Marketing
> Specialist" OR "Marketing Associate" ) AND "Creative Suite".
>
>
>
> Where condition like below syntax we are using in Postgresql function
>
>
>
> SELECT * from tablename where html_tokens @@ to_tsquery( ' ||
> quote_literal(ikeyword) || ')
>
>
>
> From search keyword we are getting result but not as expected .It is not
> searching together "Marketing Coordinator" string, It is giving result
> like "Marketing and Coordinator".
>
> Can you please help us solve this issue.
>
>
>
You should look into phraseto_tsquery() for searching for phrases, and
websearchto_tsquery() for the kind of complete search with or and and in it
that you are looking for. to_tsquery doesn't do any parsing like that.
//Magnus
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2019-01-18 15:38:36 | Re: Upgrading from 9.2.15 to 9.4.20 |
Previous Message | Ritanjali Majihee | 2019-01-18 14:54:42 | RE: Full text search with more than one word |