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

direct children, exact, and parent path restrictions don't work when path transformation takes place

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.10.3, 1.8.14, 1.16.0
    • Component/s: lucene
    • Labels:
      None

      Description

      An index such as:

      + /oak:index/ntbaseIdx
         - evaluatePathRestrictions = true
         + indexRules/nt:base/properties
            + prop
               - propertyIndex = true
      

      attempts to answer a query such as:

      /jcr:root/path/element(*, some:Type)[par/@prop='bar']
      

      but current this query is planned by this index as

      prop:bar :depth:[2 TO 2] :ancestors:/path
      

      which won't get this result. This is because the depth constraint should've been modified to :depth:[3 TO 3]
      Do note that even :ancestors constraint is wrong (too lenient).
      So, the correct plan should've looked like:

      prop:bar :depth:[3 TO 3] :ancestors:/path
      

      Similar issue exist for exact and parent path restrictions (these don't need evaluatePathRestriction as well)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                catholicon Vikas Saurabh
                Reporter:
                catholicon Vikas Saurabh
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: