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

Use an index only if a certain node or property exists

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.10.0, 1.9.9
    • Component/s: indexing, query
    • Labels:
      None

      Description

      Currently, adding a new index (or reindexing) means the index is used for queries as soon as indexing is finished. When using the composite node store (in a blue-green deployment), it would be better if there is some control on when the index is used for queries. Meaning, the index is used only if a certain node or property exists. It is not used if the node or property doesn't exist. That allows to control usage as follows:

      • Old (blue) version: node /library/version, property v1 does exist, but v2 does not.
      • New (green) version: node /library/version, property v1 does not exist, but v2 does exist.

      Now a new index can be created which is not used with the old version, but used with the new version. The index configuration is as follows:

      /oak:index/foo_v2/@useIfExists = /library/version/@v2
      

      Similary, an index is used only with the old, but not with the new version, as follows:

      /oak:index/foo_v1/@useIfExists = /library/version/@v1
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: