Thomas Mueller created JCR-3460:
-----------------------------------

             Summary: PropertyIndex uses TraversingCursor but should not
                 Key: JCR-3460
                 URL: https://issues.apache.org/jira/browse/JCR-3460
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: query
            Reporter: Thomas Mueller
            Assignee: Thomas Mueller


The org.apache.jackrabbit.oak.plugins.index.property.PropertyIndex uses the 
traversing cursor (that traverses over the whole repository) when there is no 
index. This is not how the index mechanism is supposed to work: if there is no 
property index, then the cost function of the property index should return 
infinity or max value, so that the property index isn't used.

According to my test the PropertyIndex never really falls back to traversing, 
so this might just be "defensive programming". However, in this case it would 
be better if the code would throw an exception, otherwise we risk not seeing 
the bug in the PropertyIndex cost method.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to