Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-8967

OR query with ORDER BY don't work as expected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.22.3, 1.30.0, 1.8.25
    • indexing, search
    • None

    Description

      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

       

      Attachments

        Issue Links

          Activity

            People

              mkataria Mohit Kataria
              mkataria Mohit Kataria
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: