custom lucene index not used by query in AEMaaCS
Hi community members,
I've created below custom oak:index in my local instance with aem-sdk 20230713T151945Z-230601.
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:tm="internal"
compatVersion="{Long}2"
async="async"
jcr:primaryType="oak:QueryIndexDefinition"
evaluatePathRestrictions="{Boolean}true"
type="lucene">
<indexRules jcr:primaryType="nt:unstructured">
<feedItem jcr:primaryType="nt:unstructured">
<properties jcr:primaryType="nt:unstructured">
<publishDate name="tm:publishDate" ordered="{Boolean}true" jcr:primaryType="nt:unstructured"/>
<isNotShown name="tm:doNotShow/tm:isNotShown" propertyIndex="{Boolean}true" jcr:primaryType="nt:unstructured"/>
</properties>
</feedItem>
</indexRules>
</jcr:root>
The index is created under /oak:index successfully.
But when using queryPerformance to explain query:
/jcr:root/content/refdata/RssFeeds/ninecelebrity//element(*, tm:feedItem)[(tm:doNotShow/@tm:isNotShown = 'false')] order by @1598819:publishDate descending
It says "No indexes were used. This is a traversal query.".
Anybody has idea why the created index not used in the query?
Best Regards,
Eddie