Consider a simple FLWR expression:
for $q in input()/doctype
where tf:containsText($q/somefield, “sometext”)
return $q
If I enclose the condition in the where clause in a not() function the query slows down extremely and an ?explain? shows that Tamino drops the index usage in that case. I am using Tamino 4.2.
Is there an optimized way to formulate a query with negated conditions?
Thanks in advance.
Hi,
Unfortunately the XQuery processor does not do any index optimization for negated predicates.
In certain cases your can specify a negation of a comparison predicate. But for text search predicates there is no way to specify a negation that can be evaluated by accessing an index.
Best regards,
Thorsten