forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit26cf16a
committed
Fix YA text phrase search bug.
checkcondition_str() failed to report multiple matches for a prefixpattern correctly: it would dutifully merge the match positions, butthen after exiting that loop, if the last prefix-matching word hadhad no suitable positions, it would report there were no matches.The upshot would be failing to recognize a match that the queryshould match.It looks like you need all of these conditions to see the bug:* a phrase search (else we don't ask for match position details)* a prefix search item (else we don't get to this code)* a weight restriction (else checkclass_str won't fail)Noted while investigating a problem report from Pavel Borisov,though this is distinct from the issue he was on about.Back-patch to 9.6 where phrase search was added.1 parent4d21263 commit26cf16a
File tree
3 files changed
+28
-1
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+28
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1327 | 1327 | | |
1328 | 1328 | | |
1329 | 1329 | | |
1330 | | - | |
1331 | 1330 | | |
1332 | 1331 | | |
1333 | 1332 | | |
1334 | 1333 | | |
1335 | 1334 | | |
| 1335 | + | |
| 1336 | + | |
1336 | 1337 | | |
1337 | 1338 | | |
1338 | 1339 | | |
| |||
1398 | 1399 | | |
1399 | 1400 | | |
1400 | 1401 | | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
1401 | 1407 | | |
1402 | 1408 | | |
1403 | 1409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
534 | 552 | | |
535 | 553 | | |
536 | 554 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
101 | 104 | | |
102 | 105 | | |
103 | 106 | | |
| |||
0 commit comments
Comments
(0)