You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Nitin Gupta (Jira)" <ji...@apache.org> on 2022/01/12 04:05:00 UTC

[jira] [Created] (OAK-9662) Perform inequality matches in Lucene+Elastic, rather than just in the query engine

Nitin Gupta created OAK-9662:
--------------------------------

             Summary: Perform inequality matches in Lucene+Elastic, rather than just in the query engine
                 Key: OAK-9662
                 URL: https://issues.apache.org/jira/browse/OAK-9662
             Project: Jackrabbit Oak
          Issue Type: Improvement
            Reporter: Nitin Gupta


Currently it appears that inequality matches are never fully performed inside Lucene (whereas obviously equality matches ARE).

 

Inequality query like 
{code:java}
/jcr:root/test/a//element(*, nt:base)[testProp != 'sample']  {code}
This yields the plan which includes the Lucene query like below - effectively matching documents with _any_ value of this field and relying on the Query Engine to filter out those which are not equal to the passed value.
{code:java}
+:ancestors:/test/a +testProp:[* TO *] {code}
And then all the results are fetched and the inequality condition is satisfied by QueryEngine - this leads to slower queries and even IndexTraversed read limit being exceeded in case of large repositories.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)