[ 
https://issues.apache.org/jira/browse/OAK-985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13761694#comment-13761694
 ] 

Alex Parvulescu commented on OAK-985:
-------------------------------------

bq. The filter looks OK because a constraint on jcr:primaryType is indeed just 
a constraint on a property and not the type of a node.

fair enough

bq. Maybe there's a problem with the cost calculation?

It looks like the node type index is not even aware that we have a constraint 
on a node type in the form of a property constraint. [0]


[0] 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexLookup.java?view=markup#l70

                
> The query engine doesn't properly extract the node type information from 
> queries with conditions on jcr:primaryType
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: OAK-985
>                 URL: https://issues.apache.org/jira/browse/OAK-985
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core, query
>            Reporter: Alex Parvulescu
>
> Given the following query:
> {code}
> //*[(jcr:contains(., 'dog')) and @jcr:primaryType = 'nt:file']
> {code}
> The query engine will generate a filter with a match-all clause on the node 
> type and a property restriction on _jcr:primaryType_ to the value 'nt:file'.
> I think it should add the _jcr:primaryType_ condition to the node type 
> conditions, and not to the node property ones.

--
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