I am facing below issue about property indexing.
I have two property indexes (cqModel, cqTags )defined at "/content/dam/personal-site/oak:index".
Interesting thing is if I move these property indexes to '/oak:index" default out of the box location, property indexes picked by query. But not when indexes defined at "/content/dam/personal-site/oak:index".
content that needs indexing will be at /content/dam/personal-site/faqs folder.
sample queries to try:
select [jcr:path], [jcr:score], * from [dam:AssetContent] as a where [data/cq:model] = '/conf/pi/CF-Models/settings/dam/cfm/models/faq-model' and isdescendantnode(a, '/content/dam/pi/test-sreeni/faq2')
select [jcr:path], [jcr:score], * from [dam:AssetContent] as a where [data/master/cq:tags] in('we-retail:gender', 'we-retail:activity') and isdescendantnode(a, '/content/dam/pi/test-sreeni/faq2')
select [jcr:path], [jcr:score], * from [dam:AssetContent] as a
where [data/cq:model] = '/conf/pi/CF-Models/settings/dam/cfm/models/faq-model'
and [data/master/cq:tags] in('we-retail:gender', 'we-retail:activity')
and isdescendantnode(a, '/content/dam/pi/test-sreeni/faq2')
Any ideas , what I am missing.
Views
Replies
Total Likes
Hi @sreedobe
I believe AEM Store index definition at ui.apps/src/main/content/jcr_root/_oak_index
Could you please share the document which you are referring to create index?
I followed documentation and created oak indexes as part of ui.content rather than ui.apps , i do not think this matters as resulted oak:index stored at /content/dam/site/oak:index . please let me know.
Views
Replies
Total Likes
Hi @sreedobe
Still not able to see the location, in the above article the index is created at /oak:index e.g. ui.apps/src/main/content/jcr_root/_oak_index/damAssetLucene-8-custom-1/.content.xml
Please check @giuseppebag recommendation for custom location.
You can look at https://oakutils.appspot.com/generate/index to generate index by providing the queries. I would recommend to proceed with Lucene index as there are multiple properties you are using in queries.
I created below index at root /oak:index as part of ui.apps.
Does reindex="{Boolean}false" needs to be false or true ?
I have manually triggered indexing by setting reindex=true in my local aem.
But when I check the same index on upper environments,
I still see traversal queries in logs. note: if I execute the query from logs in "query performance , explain query" tool , it is picking the index.
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:oak="http://jackrabbit.apache.org/oak/ns/1.0" xmlns:dam="http://www.day.com/dam/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:rep="internal"
jcr:mixinTypes="[rep:AccessControllable]"
jcr:primaryType="nt:unstructured">
<acme.damAssetContent-1-custom-1
jcr:primaryType="oak:QueryIndexDefinition"
async="[async,nrt]"
compatVersion="{Long}2"
type="lucene"
reindex="{Boolean}false"
evaluatePathRestrictions="{Boolean}true"
includedPaths="[/content/dam/acme]"
queryPaths="[/content/dam/acme]"
fullTextEnabled="{Boolean}false"
tags="[piwebfragments]">
<indexRules jcr:primaryType="nt:unstructured">
<dam:AssetContent jcr:primaryType="nt:unstructured">
<properties jcr:primaryType="nt:unstructured">
<contentFragment jcr:primaryType="nt:unstructured" name="contentFragment"
propertyIndex="{Boolean}true" type="Boolean"/>
<model jcr:primaryType="nt:unstructured" name="data/cq:model"
propertyIndex="{Boolean}true" type="String"/>
</properties>
</dam:AssetContent>
</indexRules>
</acme.damAssetContent-1-custom-1>
</jcr:root>
Views
Replies
Total Likes
Hi @sreedobe
As per Oak Documentation it is not recommended to set reindex =true , because it does not bring significant benefits and cause performance issue.
https://jackrabbit.apache.org/oak/docs/query/indexing.html#reindexing
Please check https://adapt.to/2024/schedule/indexing-in-aemaacs-behind-the-scenes to know how indexing works behind the scene.
Hi @sreedobe
Please refer the documentation - https://experienceleague.adobe.com/en/docs/experience-manager-learn/foundation/development/understan...
If you are trying to get this in AEM as a cloud service environment, you would need to change the index type to Lucene. Hope this helps!
Thanks
Narendra
hi, in any case I recommend to have a look at Ensure Oak Index
@sreedobe Did you find the suggestions helpful? Please let us know if you need more information. If a response worked, kindly mark it as correct for posterity; alternatively, if you found a solution yourself, we’d appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies