res = TS_execute(GETQUERY(query),
&gcv,
- TS_EXEC_CALC_NOT | TS_EXEC_PHRASE_NO_POS,
+ TS_EXEC_PHRASE_NO_POS,
checkcondition_gin);
}
if (TS_execute(GETQUERY(query),
&gcv,
- TS_EXEC_CALC_NOT | TS_EXEC_PHRASE_NO_POS,
+ TS_EXEC_PHRASE_NO_POS,
checkcondition_gin))
res = recheck ? GIN_MAYBE : GIN_TRUE;
}
PG_RETURN_BOOL(TS_execute(GETQUERY(query),
key,
- TS_EXEC_PHRASE_NO_POS | TS_EXEC_CALC_NOT,
+ TS_EXEC_PHRASE_NO_POS,
checkcondition_bit));
}
else
chkval.arre = chkval.arrb + ARRNELEM(key);
PG_RETURN_BOOL(TS_execute(GETQUERY(query),
(void *) &chkval,
- TS_EXEC_PHRASE_NO_POS | TS_EXEC_CALC_NOT,
+ TS_EXEC_PHRASE_NO_POS,
checkcondition_arr));
}
}
fillQueryRepresentationData(qr, ptr);
if (TS_execute(GETQUERY(qr->query), (void *) qr,
- TS_EXEC_CALC_NOT, checkcondition_QueryOperand))
+ TS_EXEC_EMPTY, checkcondition_QueryOperand))
{
if (WEP_GETPOS(ptr->pos) < ext->p)
{
* We need not touch data->width, since a NOT operation does not
* change the match width.
*/
- if (!(flags & TS_EXEC_CALC_NOT))
+ if (flags & TS_EXEC_SKIP_NOT)
{
- /* without CALC_NOT, report NOT as "match everywhere" */
+ /* with SKIP_NOT, report NOT as "match everywhere" */
Assert(data->npos == 0 && !data->negate);
data->negate = true;
return TS_YES;
switch (curitem->qoperator.oper)
{
case OP_NOT:
- if (!(flags & TS_EXEC_CALC_NOT))
+ if (flags & TS_EXEC_SKIP_NOT)
return TS_YES;
switch (TS_execute_recurse(curitem + 1, arg, flags, chkcond))
{
chkval.operand = GETOPERAND(query);
result = TS_execute(GETQUERY(query),
&chkval,
- TS_EXEC_CALC_NOT,
+ TS_EXEC_EMPTY,
checkcondition_str);
PG_FREE_IF_COPY(val, 0);
*/
#define TS_EXEC_EMPTY (0x00)
/*
- * If TS_EXEC_CALC_NOT is not set, then NOT expressions are automatically
- * evaluated to be true. Useful in cases where NOT isn't important (ranking).
+ * If TS_EXEC_SKIP_NOT is set, then NOT sub-expressions are automatically
+ * evaluated to be true. This was formerly the default behavior. It's now
+ * deprecated because it tends to give silly answers, but some applications
+ * might still have a use for it.
*/
-#define TS_EXEC_CALC_NOT (0x01)
+#define TS_EXEC_SKIP_NOT (0x01)
/*
* If TS_EXEC_PHRASE_NO_POS is set, allow OP_PHRASE to be executed lossily
* in the absence of position information: a true result indicates that the