forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite1d70ba
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 parent2eea494 commite1d70ba
File tree
3 files changed
+28
-1
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+28
-1
lines changedLines changed: 7 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1325 | 1325 |
| |
1326 | 1326 |
| |
1327 | 1327 |
| |
1328 |
| - | |
1329 | 1328 |
| |
1330 | 1329 |
| |
1331 | 1330 |
| |
1332 | 1331 |
| |
1333 | 1332 |
| |
| 1333 | + | |
| 1334 | + | |
1334 | 1335 |
| |
1335 | 1336 |
| |
1336 | 1337 |
| |
| |||
1396 | 1397 |
| |
1397 | 1398 |
| |
1398 | 1399 |
| |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
1399 | 1405 |
| |
1400 | 1406 |
| |
1401 | 1407 |
| |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
533 | 533 |
| |
534 | 534 |
| |
535 | 535 |
| |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
536 | 554 |
| |
537 | 555 |
| |
538 | 556 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
101 | 101 |
| |
102 | 102 |
| |
103 | 103 |
| |
| 104 | + | |
| 105 | + | |
| 106 | + | |
104 | 107 |
| |
105 | 108 |
| |
106 | 109 |
| |
|
0 commit comments
Comments
(0)