Thomas Mueller created OAK-12100:
------------------------------------

             Summary: Queries with nodeName don't run efficiently (estimated 
cost is too high)
                 Key: OAK-12100
                 URL: https://issues.apache.org/jira/browse/OAK-12100
             Project: Jackrabbit Oak
          Issue Type: Improvement
          Components: lucene, query
            Reporter: Thomas Mueller


The following query:

{noformat}
SELECT * FROM [acme:Asset] AS asset 
WHERE ISDESCENDANTNODE(asset, '/content') 
AND (NAME(asset) = 'berne' 
OR asset.[jcr:content/metadata/alias] = 'running' 
OR asset.[jcr:uuid] = 'running')
{noformat}

with jcr:content/metadata/alias and jcr:uuid are both configured in the 
definition with propertyIndex=true .

When run, it uses an index but it only uses the path filter (ancestor).

And when removing the filter on nodeName, the filter on alias is applied at 
index level.

Removing the filter on alias and jcr:uuid : the filter on nodeName is applied 
at index level.

Why jcr:uuid is never used in the query even if configured as property index?

The same behaviour happens on both elastic and lucene. It may be a problem is 
in the query engine.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to