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 "Mohit Kataria (Jira)" <ji...@apache.org> on 2021/10/21 06:22:00 UTC

[jira] [Commented] (OAK-8967) OR query with ORDER BY don't work as expected

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

Mohit Kataria commented on OAK-8967:
------------------------------------

Removing label : [candidate_oak_1_8|https://issues.apache.org/jira/issues/?jql=labels+%3D+candidate_oak_1_8]

Will backport if some one asks for this.

 

> OR  query with ORDER BY don't work as expected
> ----------------------------------------------
>
>                 Key: OAK-8967
>                 URL: https://issues.apache.org/jira/browse/OAK-8967
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: search
>            Reporter: Mohit Kataria
>            Assignee: Mohit Kataria
>            Priority: Major
>              Labels: candidate_oak_1_8
>             Fix For: 1.22.3, 1.30.0
>
>
> A query with Or and having order by along with limit Don't reproduce results as per order mentioned. 
> e.g. 
> Let content be:
> "/UnionQueryTest1/node0",
> "/UnionQueryTest/node0",
> "/UnionQueryTest1/node0/node1",
> "/UnionQueryTest/node0/node1",
> "/UnionQueryTest1/node0/node1/node2",
> "/UnionQueryTest/node0/node1/node2",
> "/UnionQueryTest1/node0/node1/node2/node3",
> "/UnionQueryTest/node0/node1/node2/node3"
> each node having x = number in node name.
> SELECT idn1.* FROM [nt:base] as idn1 WHERE ISDESCENDANTNODE([/UnionQueryTest]) OR  ISDESCENDANTNODE([/UnionQueryTest1]) ORDER BY idn1.[x] ASC
>  
> result should be  same as above mentioned where as current result come out to be
> /UnionQueryTest1/node0
> /UnionQueryTest1/node0/node1
> /UnionQueryTest1/node0/node1/node2
> /UnionQueryTest1/node0/node1/node2/node3
> /UnionQueryTest1/node0/node1/node2/node3/node4
> /UnionQueryTest/node0
> /UnionQueryTest/node0/node1
> /UnionQueryTest/node0/node1/node2
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)