Hi Guys,
I am trying to query some assets (type = dam:Asset) within my AEM instance.
However even when i search for a simple xpath query such as below , the query is only picking the OOB /oak:index/lucene rather than the expected /oak:index/damAssetLucene .
/jcr:root/content/dam/my/custom/assets//element(*, dam:Asset) order by jcr:content/@jcr:lastModified descending
Kindly note that there are no custom indices in place. Please also find the logs attached for reference.
AEM version : 6.3 . Please let me knwo wha
Thanks
Harish
Hi Harish,
Your query requires an indexed propety for dam:Asset as jcr:primaryType:
- async = "async"
- jcr:primaryType = oak:QueryIndexDefinition
- evaluatePathRestrictions = true
- type = "lucene"
+ indexRules
+ dam:Asset
+ properties
+ primaryType
- name = "jcr:primaryType"
- propertyIndex = true
+ lastModified
- name = "jcr:content/jcr:lastModified"
- ordered = true
OOTB /oak:index/damAssetLucene does not have such a property.
You should add something like:
Reindex and re-try your test.
Regards,
Hi Berlient,
Thanks for your response.
Firstly the node dam:Asset was already available in my instance.
Secondly i re-ran the instance , by adding the name and property Index properties to the dam:Asset node.
But i still dont see my dam:Asset index being picked up.
Thanks
Harish
Views
Replies
Total Likes
Hi berliant
From what I see you have a mismatch between the screenshot and the structure you outlined in the text. In the screenshot you added the "jcr:primaryType" to the index, while in text you recommended to add a "lastModified" property (which seems to be a better match for the question).
HarishDv Can you try again with lastModified property?
Views
Replies
Total Likes
HI Jörg Hoh
I tried that as well.
The name of the string used is already as you have asked .
Thanks
Harish
Views
Replies
Total Likes
Did you got any success my dam:asset is also not getting picked up
Views
Replies
Total Likes
Views
Likes
Replies