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/02/05 13:51:34 UTC

[jira] [Commented] (OAK-2475) Query Filter looses property constraints for multiple and conditions for same property

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

Thomas Mueller commented on OAK-2475:
-------------------------------------

Changes in the API might not be needed. The class PropertyRestriction has String propertyName and PropertyValue first, last, and List<PropertyValue> list. A PropertyValue can be an scalar value, or a multi-value. For this case, if the data type is always the same, then first and last could be set to ['a', 'c'].

> Query Filter looses property constraints for multiple and conditions for same property
> --------------------------------------------------------------------------------------
>
>                 Key: OAK-2475
>                 URL: https://issues.apache.org/jira/browse/OAK-2475
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: query
>            Reporter: Chetan Mehrotra
>            Assignee: Thomas Mueller
>            Priority: Minor
>             Fix For: 1.0.12, 1.1.7
>
>
> Current while evaluating a query like following where {{propa}} is a multi value property
> {code}
> select [jcr:path] from [nt:base] where propa = 'a' and propa = 'c'
> {code}
> Filter created by Query Engine only has one property restriction for _propa = 'a'_. This happens because FilterImpl uses a map to store the propertyRestrictions.
> Eventually query engine returns the right result as query engine evaluates both restrictions on the result set returned by index. However index does not get to know of other restrictions and would return more result than required.
> Expected - Filter gets access to all property restrictions. 



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