Skip to content

Commit fd321b6

Browse files
author
Artur Zakirov
committed
Improve speed
1 parent 028bc43 commit fd321b6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

rum_ts_utils.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,12 @@ get_docrep_addinfo(bool *check, QueryRepresentation *qr, int *map_item_operand,
717717
if (!check[keyN])
718718
continue;
719719

720+
/*
721+
* entries could be repeated in tsquery, do not visit them twice
722+
* or more. Modifying of check array (entryRes) is safe
723+
*/
724+
check[keyN] = false;
725+
720726
if (!addInfoIsNull[keyN])
721727
{
722728
dimt = count_pos(VARDATA_ANY(addInfo[keyN]),

0 commit comments

Comments
 (0)