I deployed the index in my AEM project, it works in Author but it's not working in Publish.
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:dam="http://www.day.com/dam/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:oak="http://jackrabbit.apache.org/oak/ns/1.0" xmlns:rep="internal"
jcr:mixinTypes="[rep:AccessControllable]"
jcr:primaryType="oak:QueryIndexDefinition"
async="[async,nrt]"
compatVersion="{Long}2"
evaluatePathRestrictions="{Boolean}true"
includedPaths="[/content/dam/project/master/pt/pages,/content/dam/project/master/en/pages,/content/dam/project/master/es/pages,/content/dam/project/master/pt/components/central-de-ajuda/faqs/categories,/content/dam/project/master/en/components/central-de-ajuda/faqs/categories,/content/dam/project/master/es/components/central-de-ajuda/faqs/categories]"
maxFieldLength="{Long}100000"
type="lucene"
tags="[visualSimilaritySearch]">
<facets
jcr:primaryType="nt:unstructured"
secure="insecure"
topChildren="100"/>
<indexRules jcr:primaryType="nt:unstructured">
<dam:Asset jcr:primaryType="nt:unstructured">
<properties jcr:primaryType="nt:unstructured">
<customIndexedData
jcr:primaryType="nt:unstructured"
name="jcr:content/data/master/customIndexedData"
nodeScopeIndex="{Boolean}true"
propertyIndex="{Boolean}false"
analyzed="{Boolean}true" />
<title
jcr:primaryType="nt:unstructured"
name="jcr:content/data/master/title"
nodeScopeIndex="{Boolean}true"
propertyIndex="{Boolean}false"
analyzed="{Boolean}true" />
<seoTitle
jcr:primaryType="nt:unstructured"
name="jcr:content/data/master/seoTitle"
nodeScopeIndex="{Boolean}true"
propertyIndex="{Boolean}false"
analyzed="{Boolean}true" />
<seoDescription
jcr:primaryType="nt:unstructured"
name="jcr:content/data/master/seoDescription"
nodeScopeIndex="{Boolean}true"
propertyIndex="{Boolean}false"
analyzed="{Boolean}true" />
<answer
jcr:primaryType="nt:unstructured"
name="jcr:content/data/master/answer"
nodeScopeIndex="{Boolean}true"<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:dam="http://www.day.com/dam/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:oak="http://jackrabbit.apache.org/oak/ns/1.0" xmlns:rep="internal"
jcr:mixinTypes="[rep:AccessControllable]"
jcr:primaryType="oak:QueryIndexDefinition"
async="[async,nrt]"
compatVersion="{Long}2"
evaluatePathRestrictions="{Boolean}true"
includedPaths="[/content/dam/project/master/pt/pages,/content/dam/project/master/en/pages,/content/dam/project/master/es/pages,/content/dam/project/master/pt/components/central-de-ajuda/faqs/categories,/content/dam/project/master/en/components/central-de-ajuda/faqs/categories,/content/dam/project/master/es/components/central-de-ajuda/faqs/categories]"
maxFieldLength="{Long}100000"
type="lucene"
tags="[visualSimilaritySearch]">
<facets
jcr:primaryType="nt:unstructured"
secure="insecure"
topChildren="100"/>
<indexRules jcr:primaryType="nt:unstructured">
<dam:Asset jcr:primaryType="nt:unstructured">
<properties jcr:primaryType="nt:unstructured">
<customIndexedData
jcr:primaryType="nt:unstructured"
name="jcr:content/data/master/customIndexedData"
nodeScopeIndex="{Boolean}true"
propertyIndex="{Boolean}false"
analyzed="{Boolean}true" />
<title
jcr:primaryType="nt:unstructured"
name="jcr:content/data/master/title"
nodeScopeIndex="{Boolean}true"
propertyIndex="{Boolean}false"
analyzed="{Boolean}true" />
<seoTitle
jcr:primaryType="nt:unstructured"
name="jcr:content/data/master/seoTitle"
nodeScopeIndex="{Boolean}true"
propertyIndex="{Boolean}false"
analyzed="{Boolean}true" />
<seoDescription
jcr:primaryType="nt:unstructured"
name="jcr:content/data/master/seoDescription"
nodeScopeIndex="{Boolean}true"
propertyIndex="{Boolean}false"
analyzed="{Boolean}true" />
<answer
jcr:primaryType="nt:unstructured"
name="jcr:content/data/master/answer"
nodeScopeIndex="{Boolean}true"
propertyIndex="{Boolean}false"
analyzed="{Boolean}true" />
<question
jcr:primaryType="nt:unstructured"
name="jcr:content/data/master/question"
nodeScopeIndex="{Boolean}true"
propertyIndex="{Boolean}false"
analyzed="{Boolean}true" />
</properties>
</dam:Asset>
</indexRules>
<analyzers jcr:primaryType="nt:unstructured">
<default jcr:primaryType="nt:unstructured">
<tokenizer jcr:primaryType="nt:unstructured" name="standard" />
<filters jcr:primaryType="nt:unstructured">
<lowercase jcr:primaryType="nt:unstructured" />
<asciifolding jcr:primaryType="nt:unstructured" />
</filters>
</default>
</analyzers>
<tika jcr:primaryType="nt:unstructured">
<config.xml jcr:primaryType="nt:file"/>
</tika>
</jcr:root>
propertyIndex="{Boolean}false"
analyzed="{Boolean}true" />
<question
jcr:primaryType="nt:unstructured"
name="jcr:content/data/master/question"
nodeScopeIndex="{Boolean}true"
propertyIndex="{Boolean}false"
analyzed="{Boolean}true" />
</properties>
</dam:Asset>
</indexRules>
<analyzers jcr:primaryType="nt:unstructured">
<default jcr:primaryType="nt:unstructured">
<tokenizer jcr:primaryType="nt:unstructured" name="standard" />
<filters jcr:primaryType="nt:unstructured">
<lowercase jcr:primaryType="nt:unstructured" />
<asciifolding jcr:primaryType="nt:unstructured" />
</filters>
</default>
</analyzers>
<tika jcr:primaryType="nt:unstructured">
<config.xml jcr:primaryType="nt:file"/>
</tika>
</jcr:root>
Views
Replies
Total Likes
Hi @JoelSo3 ,
Here’s how you can troubleshoot and fix the issue where your custom AEM index works in Author but not in Publish:
Step 1: Ensure Proper Deployment to Publish
Check that the index node exists on Publish:
Path: /oak:index/your-index-name
Use: http://<publish-host>:<port>/crx/de
Confirm `filter.xml` includes the index:
xml
<filter root="/oak:index/your-index-name" />
Ensure it's not excluded in a runmode-specific filter like `filter.author.xml`.
Step 2: Force Reindexing on Publish
Add these properties to the index node:
xml
reindex="{Boolean}true"
reindexCount="{Long}1"
Redeploy and restart AEM Publish
OR trigger reindex via JMX:
/system/console/jmx
Look under: org.apache.jackrabbit.oak:type=LuceneIndex,name=your-index-name
Use the reindex() method
Step 3: Check Index Status on Publish
Go to: /system/console/jmx
Find your index under:
org.apache.jackrabbit.oak:type=LuceneIndex,name=your-index-name
Verify:
Status = ACTIVE
Size > 0 (documents are indexed)
Reindex = `false` (after initial index build completes)
Step 4: Confirm Index Usage in Queries
Go to:
http://<publish-host>:<port>/libs/granite/operations/content/diagnosistools/queryPerformance.html
Run your query and Check:
If your custom index is listed under "Indexes Used"
If results are being returned
Step 5: Permissions on Publish
Check that service user or `anonymous` has **read access** to paths under `includedPaths`.
Use: `/useradmin` on Publish
Look for ACLs on:
/content/dam/project/master/...
Step 6: Check for Index Conflicts
Make sure no other index matches the same paths with higher priority.
Look in /oak:index
Check includedPaths and type of other indexes
Step 7: Validate analyzed, propertyIndex, nodeScopeIndex
Ensure they are used appropriately:
analyzed=true → for full-text search
propertyIndex=true → for exact match (not needed if full-text)
nodeScopeIndex=true → index applies at node level
Try them and let me know if something works.
Thanks.
Views
Replies
Total Likes
Hi,
Is this on AEM as a Cloud Service? If so, why do you think the deployment is not going through?
It’s possible that the reindexing process is stuck. You can check this using the Repository Browser—if you're on AEM Cloud, you should be able to verify whether the index is present there.
Hope this helps
Yes, I am using AEM as a Cloud Service.
In the query performance, I can see that I am using my customized index
In the developer console, I can see that my index is present.
However, in the developer console on the publish environment, the oak:index folder is not visible, so I can't verify whether the index is there or not.
The same query in author gives me results, but in publish it returns empty.
Views
Replies
Total Likes
Can you try debugging this by enabling logs for oak index in your publish instance. Add below classes in your log config.
org.apache.jackrabbit.oak.plugins.index
org.apache.jackrabbit.oak.query.stats.QueryRecorder,
com.day.cq.search
org.apache.jackrabbit.oak.query
I hope this will help to locate actual issue.
When I deploy damAssetLucene-custom-1, the properties type="lucene" and async="[async,nrt]" are automatically changed to async="[elastic-async]" and type="elastic".
I believe that due to this automatic change, I am having issues with my analyzers:
<analyzers jcr:primaryType="nt:unstructured">
<default jcr:primaryType="nt:unstructured">
<tokenizer jcr:primaryType="nt:unstructured" name="standard" />
<filters jcr:primaryType="nt:unstructured">
<lowercase jcr:primaryType="nt:unstructured" />
<asciifolding jcr:primaryType="nt:unstructured" />
</filters>
</default>
</analyzers>
Does anyone have any idea why this automatic change happens during deployment?
Does it make sense that this issue with the analyzers is caused by the switch from type="lucene" to type="elasticsearch"?
Views
Replies
Total Likes
Hi @JoelSo3,
Please let us know if you are still facing challenges or noeed more help. Otherwise kindly consider marking the most suitable answer as ‘correct’.
If you've discovered a solution yourself, we would appreciate it if you could share it with the community.
Views
Replies
Total Likes
@JoelSo3 Just checking in — were you able to resolve your issue?
We’d love to hear how things worked out. If the suggestions above helped, marking a response as correct can guide others with similar questions. And if you found another solution, feel free to share it — your insights could really benefit the community. Thanks again for being part of the conversation!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies