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 "Thomas Mueller (JIRA)" <ji...@apache.org> on 2015/11/13 11:23:11 UTC

[jira] [Commented] (OAK-3589) Property index with declaringNodeTypes sometimes used by mistake

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

Thomas Mueller commented on OAK-3589:
-------------------------------------

http://svn.apache.org/r1714180 (trunk)

> Property index with declaringNodeTypes sometimes used by mistake
> ----------------------------------------------------------------
>
>                 Key: OAK-3589
>                 URL: https://issues.apache.org/jira/browse/OAK-3589
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: query
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>             Fix For: 1.3.11
>
>
> A property index with declaringNodeTypes is sometimes used where it must not be used. Example:
> {noformat}
> /oak:index/testIndex (oak:QueryIndexDefinition)
>     declaringNodeTypes = ['oak:QueryIndexDefinition'] (Name) 
>     propertyNames = ['testProp'] (Name) 
>     type = 'property'
>     x (nt:unstructured)
>         testProp = '1234'
>     
> query:
> /jcr:root//element(*, oak:QueryIndexDefinition)[./x/@testProp="1234"]
> {noformat}
> (please note there should be more nodes, so that index is used for the query and not traversal).
> The problem is that the index is used, even thought the property is not in the node itself (of type oak:QueryIndexDefinition), but in a child node (with a different node type).
> The the index is used, and the result is empty. If the index is disabled, then traversal is used (or another index), and the correct result is returned.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)