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

Nodetype index support in Lucene Index

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.7.10, 1.8.0
    • lucene
    • None

    Description

      Lucene indexes currently support nodetype index in some form by specifying a property definition for "jcr:primaryType" with propertyIndex=true. However this can cause issue if such rules are mixed with other rules.

      For supporting usecase where same lucene index supports multiple nodetype rules and can be used as pure nodetype index we should have a explicit support for indexing nodetypes.

      Proposal

      Any indexRule would support following properties

      • nodeTypeIndex - Boolean indicating if this rule is for nodetype indexing
      • sync - If nodetype index is sync

      if nodeTypeIndex is enabled then any explicit property definition would be ignored. With this mode following index definition would be safe to use
      (updated definition per final implementation)

      /oak:index/nodeTypeLucene
        - jcr:primaryType = "oak:QueryIndexDefinition"
        - compatVersion = 2
        - type = "lucene"
        - async = "async"
        - nodeTypeIndex = true
        + indexRules
          + nt:file
            - sync = true
          + app:Component
      

      Here the rule order would not cause any affect as for any matching rule the nodes primary and mixin types would be indexed

      Attachments

        Issue Links

          Activity

            People

              chetanm Chetan Mehrotra
              chetanm Chetan Mehrotra
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: