Re: Rethinking our fulltext phrase-search implementation
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@postgresql.org
Date: 2016-12-17T21:15:37Z
Lists: pgsql-hackers
Attachments
- ts-doc-changes.patch (text/x-diff) patch
I wrote: > It's worth noting that with these rules, phrase searches will act as > though "!x" always matches somewhere; for instance "!a <-> !b" will match > any tsvector. I argue that this is not wrong, not even if the tsvector is > empty: there could have been adjacent stopwords matching !a and !b in the > original text. Since we've adjusted the phrase matching rules to treat > stopwords as unknown-but-present words in a phrase, I think this is > consistent. It's also pretty hard to assert this is wrong and at the same > time accept "!a <-> b" matching b at the start of the document. To clarify this point, I'm imagining that the patch would include documentation changes like the attached. regards, tom lane
Commits
-
Fix strange behavior (and possible crashes) in full text phrase search.
- 4e2477b7b8b6 9.6.2 landed
- 89fcea1ace40 10.0 landed
-
Fix handling of phrase operator removal while removing tsquery stopwords.
- 2604438472c8 10.0 landed
- 3f07eff10479 9.6.2 landed