pg_search icon indicating copy to clipboard operation
pg_search copied to clipboard

How to do exact matches?

Open crysper opened this issue 8 years ago • 4 comments

The any word match works great, even though I prefer comma to separate words.

However, how can I search by record containing an exact phrase, for example if I have 2 records: a) bio: I am CEO b) bio: I am CFO

When I search with a query like this: "am CFO" to return only 1 result, not both. This is a very important feature so probably I'm just missing it. Of course, with any-word option enabled, without any_word option it gives this result, but I can't search by multiple words then.

crysper avatar Dec 31 '16 10:12 crysper

this is a great question.. trying to figure out the same issue? stumped

roboyak avatar Apr 21 '17 20:04 roboyak

I have the same issue, not able to search for phrases...

petrsigut avatar Jan 23 '19 09:01 petrsigut

This would be really helpful too. Even allowing a "raw" tsquery mode would be very helpful, so that we can just put in to_tsquery('english', 'mister <-> robot')).

iainbryson avatar Aug 20 '19 17:08 iainbryson

I whipped up a PR for this as a followed_by option. Let me know what you think. #417

nurey avatar Sep 05 '19 14:09 nurey