Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!

custom index hide template folder in AMS AEM 6.5.16

Avatar

Level 4

Hello,

 

We created a custom index like the one in attached file to increase search speed,

but if we install this index, we will not be able to see all template folders.

If you remove this index, the template folder will appear.

http://localhost:4502/libs/wcm/core/content/sites/templates.html/conf

 

Even if we check the error log file, there are no errors or warnings related to this.

I'm curious as to why these things happen and what's wrong with the index above.

I would like to hear the opinions of experts.

 

Thanks in advance.

--------------------------

<contact_search
            jcr:primaryType="oak:QueryIndexDefinition"
            async="async"
            compatVersion="{Long}2"
            evaluatePathRestrictions="{Boolean}true"
            includedPaths="[/content/aaa,/content/data,/content/bbb,/content/ccc,/content/ddd,/content/eee,/content/fff,/content/ggg,/content/hhh,/content/iii,/content/jjj,/content/kkk,/content/lll,/content/mmm]"
            includePropertyTypes="[String]"
            name="cq:Page"
            reindex="{Boolean}false"
            reindexCount="{Long}26"
            type="lucene">
        <aggregates jcr:primaryType="nt:unstructured">
                <cq:Page jcr:primaryType="nt:unstructured">
                        <include0
                        jcr:primaryType="nt:unstructured"
                        path="jcr:content"
                        relativeNode="{Boolean}true"/>
                        <include1
                        jcr:primaryType="nt:unstructured"
                        path="orginfo"
                        relativeNode="{Boolean}true"/>
                        <include2
                        jcr:primaryType="nt:unstructured"
                        path="serviceinfo"
                        relativeNode="{Boolean}true"/>
                        <include3
                        jcr:primaryType="nt:unstructured"
                        path="serviceinfo/*"
                        relativeNode="{Boolean}true"/>
                        <include4
                        jcr:primaryType="nt:unstructured"
                        path="serviceinfo/*/*"
                        relativeNode="{Boolean}true"/>
                        <include5
                        jcr:primaryType="nt:unstructured"
                        path="contactinfo"
                        relativeNode="{Boolean}true"/>
                </cq:Page>
                <nt:file jcr:primaryType="nt:unstructured">
                        <include0
                        jcr:primaryType="nt:unstructured"
                        path="jcr:content"
                        relativeNode="{Boolean}false"/>
                        <include1
                        jcr:primaryType="nt:unstructured"
                        path="orginfo"
                        relativeNode="{Boolean}false"/>
                        <include2
                        jcr:primaryType="nt:unstructured"
                        path="serviceinfo"
                        relativeNode="{Boolean}false"/>
                        <include3
                        jcr:primaryType="nt:unstructured"
                        path="contactinfo"
                        relativeNode="{Boolean}false"/>
                </nt:file>
                <cq:PageContent jcr:primaryType="nt:unstructured">
                        <include0
                        jcr:primaryType="nt:unstructured"
                        path="*"
                        relativeNode="{Boolean}false"/>
                        <include1
                        jcr:primaryType="nt:unstructured"
                        path="*/*"
                        relativeNode="{Boolean}false"/>
                        <include2
                        jcr:primaryType="nt:unstructured"
                        path="*/*/*"
                        relativeNode="{Boolean}false"/>
                        <include3
                        jcr:primaryType="nt:unstructured"
                        path="*/*/*/*"
                        relativeNode="{Boolean}false"/>
                </cq:PageContent>
        </aggregates>
        <facets jcr:primaryType="nt:unstructured"/>
        <indexRules jcr:primaryType="nt:unstructured">
                <cq:Page jcr:primaryType="nt:unstructured">
                        <properties jcr:primaryType="nt:unstructured">
                                <cqLastModified
                            jcr:primaryType="nt:unstructured"
                            name="jcr:content/cq:lastModified"
                            nodeScopeIndex="{Boolean}true"
                            ordered="{Boolean}true"
                            propertyIndex="{Boolean}true"
                            type="Date"/>
                                <jcrTitle
                            jcr:primaryType="nt:unstructured"
                            name="jcr:content/jcr:title"
                            nodeScopeIndex="{Boolean}true"
                            ordered="{Boolean}false"
                            propertyIndex="{Boolean}true"
                            type="String"
                            useInSpellcheck="{Boolean}true"
                            useInSuggest="{Boolean}true"/>
                                <pageTitle
                            jcr:primaryType="nt:unstructured"
                            name="jcr:content/pageTitle"
                            nodeScopeIndex="{Boolean}true"
                            ordered="{Boolean}false"
                            propertyIndex="{Boolean}true"
                            type="String"
                            useInSpellcheck="{Boolean}true"
                            useInSuggest="{Boolean}true"/>
                                <navTitle
                            jcr:primaryType="nt:unstructured"
                            name="jcr:content/navTitle"
                            nodeScopeIndex="{Boolean}true"
                            ordered="{Boolean}false"
                            propertyIndex="{Boolean}true"
                            type="String"
                            useInSpellcheck="{Boolean}true"
                            useInSuggest="{Boolean}true"/>
                                <nodeName
                            jcr:primaryType="nt:unstructured"
                            name=":nodeName"
                            nodeScopeIndex="{Boolean}true"
                            ordered="{Boolean}false"
                            propertyIndex="{Boolean}true"
                            type="String"
                            useInSpellcheck="{Boolean}true"
                            useInSuggest="{Boolean}true"/>
                                <cqLastRolledoutBy
                            jcr:primaryType="nt:unstructured"
                            name="jcr:content/cq:lastRolledoutBy"
                            nodeScopeIndex="{Boolean}true"
                            ordered="{Boolean}false"
                            propertyIndex="{Boolean}true"
                            type="String"/>
                        </properties>
                </cq:Page>
        </indexRules>
</contact_search>
4 Replies

Avatar

Level 4

I tried to upload this AEM package file which contains this custom index xml file to help you understand better, but uploading xml files is not allowed.

Avatar

Level 7

Hi @keehwan1 ,

The issue you're facing, where template folders disappear when using a custom index, is likely due to the way your custom index is configured. Let's break down what might be happening:

  1. Included Paths: In your custom index definition, you have specified the includedPaths property. This property determines which paths are indexed by the Lucene index. In your case, you have explicitly listed paths such as /content/aaa, /content/bbb, etc. If the template folders are located outside of these paths, they won't be indexed by your custom index.

  2. Aggregates and Index Rules: Within your custom index definition, you've specified aggregates and index rules for different node types like cq:Page, nt:file, and cq:PageContent. These rules determine which properties of nodes are indexed. If the template folders or their properties are not included in these rules, they won't be indexed properly.

  3. Restrictions in Index Definition: The evaluatePathRestrictions property is set to true in your index definition. This means that the index will only include nodes that match the specified paths in the includedPaths property. If a node doesn't match any of these paths, it won't be indexed.

To ensure that the template folders are indexed and visible, you need to review your custom index configuration:

  • Check the includedPaths property to ensure that it includes the paths where your template folders reside.
  • Review the aggregates and index rules to make sure they include the necessary properties of template folders.
  • Consider removing or adjusting the path restrictions if they are too restrictive.

If you're still experiencing issues after reviewing your custom index configuration, you may need to consult with an AEM expert or Adobe Support for further assistance, as the problem could be related to specific nuances of your AEM environment.

Avatar

Community Advisor

@keehwan1 

 

OOTB cqPageLucene excludes whats not required. Thus, /content and /conf are included in the Index

 

aanchalsikka_0-1715063332461.png

 

 

Please try with following changes:

1. Add /conf path of templates to the list

          includedPaths="[/content/aaa,/content/data,/content/bbb,/content/ccc,/content/ddd,/content/eee,/content/fff,/content/ggg,/content/hhh,/content/iii,/content/jjj,/content/kkk,/content/lll,/content/mmm]"

 

 

2. Add queryPaths property, with same value as includedPaths. Example:

"queryPaths":[/content/aaa,/content/data,/content/bbb,/content/ccc,/content/ddd,/content/eee,/content/fff,/content/ggg,/content/hhh,/content/iii,/content/jjj,/content/kkk,/content/lll,/content/mmm]"

 

 

 

 


Aanchal Sikka

Avatar

Administrator

@keehwan1 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni