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

Oak facet indexes seems to only work for nt:base

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • lucene
    • None

    Description

      We are working in AEM and want to implement a Lucene facet index based on the definition found here: https://jackrabbit.apache.org/oak/docs/query/lucene.html. However, it only works if you limit the node type to nt:base. Here's a snippet of a working facet index definition.

          <ntBaseFacetLucene
              jcr:primaryType="oak:QueryIndexDefinition"
              compatVersion="{Long}2"
              reindex="{Boolean}false"
              reindexCount="{Long}1"
              type="lucene"
              evaluatePathRestrictions="{Boolean}true"
              async="async" >
              <indexRules jcr:primaryType="nt:unstructured">
                  <nt:base jcr:primaryType="nt:unstructured">
                      <properties jcr:primaryType="nt:unstructured">
                          <contentType
                              jcr:primaryType="nt:unstructured"
                              propertyIndex="{Boolean}true"
                              facets="{Boolean}true"
                              analyzed="{Boolean}true"
                              nodeScopeIndex="{Boolean}true"
                              name="contentType" />
                      </properties>
                  </nt:base>
              </indexRules>
          </ntBaseFacetLucene>
      

      If we were to replace "nt:base" by "dam:Asset" for instance, and update the contentType name property accordingly (in our case, updated in jcr:content/metadata/contentType), then the facet wouldn't work anymore. In the logs, we would get the message "facets for {} not yet indexed".

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vsmohamed Van MOHAMED
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: