| From: | Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | [PATCH] fix GIN index search sometimes losing results |
| Date: | 2020-05-07 13:26:17 |
| Message-ID: | CALT9ZEE-aLotzBg-pOp2GFTesGWVYzXA3=mZKzRDa_OKnLF7Mg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi, all
It appeared than GIN index sometimes lose results if simultaneously:
1 if query operand contains weight marks
2 if weight-marked operand is negated by ! operator
3 if there are only logical (not phrase) operators from this negation
towards the root of query tree.
e.g. '!crew:A'::tsquery refuse to find 'crew:BCD'::tsvector
Seems it is in all versions of PG.
The patch is intended to deal with the issue. Also it contains tests for
these rare condition.
Pavel Borisov.
| Attachment | Content-Type | Size |
|---|---|---|
| gin-weights-patch-v3.diff | application/octet-stream | 2.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2020-05-07 13:38:34 | Re: PG 13 release notes, first draft |
| Previous Message | Tom Lane | 2020-05-07 13:21:31 | Re: PG compilation error with Visual Studio 2015/2017/2019 |