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>, Mahantesh Ambiger <mahantesh(dot)ambiger(at)yahoo(dot)com> |
Subject: | Re: Full text search with more than one word |
Date: | 2019-01-25 11:57:39 |
Message-ID: | CABUevEyKD=d88wicw+r67utSkawJqDvyMnF+QJeoa-oYk1APgA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Again, please do not top-post on the postgresql mailinglists, it's
considered rude.
On Fri, Jan 25, 2019 at 12:56 PM Ritanjali Majihee <
rmajhee(at)247headhunting(dot)com> wrote:
> Hi Magnus ,
>
>
>
> Example- Search keyword is ("Marketing Coordinator" OR "Marketing
> Specialist" OR "Marketing Associate" ) AND "Creative Suite".
>
>
>
> Thank you for your information , phraseto_tsquery() is supporting two word
> search or phase search where as it is not supporting logical operator
> search and to_tsquery() is supporting logical operator search but not
> supporting two word search or phase search. If we need both functionally
> in full text search is there any other way we can proceed .
>
>
>
> Can you please help us solve this issue.
>
Yes, as I said in my original email, check out the websearchto_tsquery
function.
//Magnus
>
> *From:* magnus(at)hagander(dot)net [mailto:magnus(at)hagander(dot)net]
> *Sent:* Friday, January 18, 2019 8:45 PM
> *To:* Ritanjali Majihee
> *Cc:* pgsql-general General; Ambiger, Mahantesh;
> mahantesh(dot)ambiger(at)yahoo(dot)com
> *Subject:* Re: Full text search with more than one word
>
>
>
> (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
>
>
>
--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>
From | Date | Subject | |
---|---|---|---|
Next Message | Duarte Carreira | 2019-01-25 12:49:37 | RE: duplicate OID issue when using pg_upgrade to move from 9.3 to 9.5 |
Previous Message | Ritanjali Majihee | 2019-01-25 11:53:48 | RE: Full text search with more than one word |