Skip to content

Commit 39ccbd6

Browse files
committed
[PGPRO-5136] Revert an unnecessary part of a change
8524bf0 tags: rum
1 parent 8524bf0 commit 39ccbd6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/rum_ts_utils.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,14 @@ rum_TS_execute(QueryItem *curitem, void *arg, uint32 flags,
837837
case OP_PHRASE:
838838

839839
/*
840+
* If we get a MAYBE result, and the caller doesn't want that,
841+
* convert it to NO. It would be more consistent, perhaps, to
842+
* return the result of TS_phrase_execute() verbatim and then
843+
* convert MAYBE results at the top of the recursion. But
844+
* converting at the topmost phrase operator gives results that
845+
* are bug-compatible with the old implementation, so do it like
846+
* this for now.
847+
*
840848
* Checking for TS_EXEC_PHRASE_NO_POS has been moved inside
841849
* rum_phrase_execute, otherwise we can lose results of phrase
842850
* operator when position information is not available in index
@@ -849,7 +857,7 @@ rum_TS_execute(QueryItem *curitem, void *arg, uint32 flags,
849857
case TS_YES:
850858
return TS_YES;
851859
case TS_MAYBE:
852-
return TS_MAYBE;
860+
return (flags & TS_EXEC_PHRASE_NO_POS) ? TS_MAYBE : TS_NO;
853861
}
854862
break;
855863

0 commit comments

Comments
 (0)