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

Indexes with excludedPaths, or includedPaths should not be picked for queries without path

    XMLWordPrintableJSON

    Details

      Description

      Queries that don't have a clear path restriction should not use indexes that have excludedPaths or includedPaths set, except in some exceptional cases (to be defined).

      For example, if a query doesn't have a path restriction, say:

      /jcr:root//element(*, nt:base)[@status='RUNNING']
      

      Then an index that has excludedPaths set (for example to /etc) shouldn't be used, at least not if a different index is available. Currently it is used currently, actually in favor of another index, if the property "status" is commonly used in /etc. Because of that, the index that doesn't have excludedPath has a higher cost (as it indexes the property "status" in /etc, and so has more entries for "status", than the index that doesn't index /etc).

      The same for includedPaths, in case queryPaths isn't set to the same value(s).

        Attachments

        1. 0001-OAK-7254-Indexes-with-excludedPaths-or-includedPaths.patch
          49 kB
          Mohit Kataria
        2. OAK-7254-B.patch
          46 kB
          Thomas Mueller
        3. OAK-7254-C.patch
          48 kB
          Thomas Mueller

          Activity

            People

            • Assignee:
              thomasm Thomas Mueller
              Reporter:
              thomasm Thomas Mueller
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: