[ https://issues.apache.org/jira/browse/OAK-2146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Amit Jain updated OAK-2146: --------------------------- Attachment: OAK-2146-Changes.patch The problem here is that from the {{SelectorImpl#createFilter}} method the following method is called which only retains common values (uses {{List#retainAll}}). Changing it {{List#removeAll}} and then {{List#addAll}}} fixes the issue. {code} public void restrictPropertyAsList(String propertyName, List<PropertyValue> list) { PropertyRestriction x = addRestricition(propertyName); if (x.list == null) { x.list = list; } else { x.list.retainAll(list); } } {code} Patch also attached with the small change. [~tmueller] Is this the correct fix? All tests pass. > empty resultset for PropertyIndex and multi-value properties with mixed OR+AND > ------------------------------------------------------------------------------ > > Key: OAK-2146 > URL: https://issues.apache.org/jira/browse/OAK-2146 > Project: Jackrabbit Oak > Issue Type: Bug > Components: core, query > Affects Versions: 1.0, 1.1.0 > Reporter: Davide Giannella > Assignee: Davide Giannella > Fix For: 1.1.1 > > Attachments: OAK-2146-Changes.patch, OAK-2146-test.patch > > > When querying an indexed property on a multi-value fields and asking > to retrieve nodes with 2 values in 2 variants (see query below) no > results are returned > {noformat} > //*[ > (@property = 'a' or @property" = 'c') > and > (@property = 'b' or @property = 'd')] > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)