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

Rishabh Maurya commented on OAK-1405:
-------------------------------------

[~tmueller]
It seems queries are dependent on order of constraints in them. Below query 
works fine 

//element(*, dam:Asset) 
[
 jcr:content/metadata/@cq:tags = 'abc'   or jcr:content/metadata/@cq:tags = 
'abc'  or jcr:like(jcr:content/metadata/@cq:tags,'stockphotography:business') 
]

After changing order of last constraint, it didn't worked -

 
//element(*, dam:Asset) 
[
 jcr:content/metadata/@cq:tags = 'abc'    or 
jcr:like(jcr:content/metadata/@cq:tags,'stockphotography:business')  or 
jcr:content/metadata/@cq:tags = 'abc'
]

Its like only last constraint is effective and it occurs when there are atleast 
3 constraints and atleast one of them uses jcr:like function.

> OR of different constraints broken
> ----------------------------------
>
>                 Key: OAK-1405
>                 URL: https://issues.apache.org/jira/browse/OAK-1405
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: query
>    Affects Versions: 0.15
>            Reporter: Ankush Malhotra
>            Assignee: Thomas Mueller
>             Fix For: 0.17
>
>
> There is a peculiar search bug on load 16 that 'OR' of 3 constraints is 
> broken but removing any one returns the results.  The below query returns no 
> results but removing any one of 3 'OR'ed conditions returns the result. 
> //*[(  jcr:content/metadata/@cq:tags = 'stockphotography:business'   or 
> jcr:like(jcr:content/metadata/@cq:tags, 'stockphotography:business/%') or 
> jcr:content/metadata/@cq:tags = '/etc/tags/stockphotography/business') ]



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to