Index Definition for ISDESCENDANTNODE is not working in Query Explain
I have added the index definition in the oak-index folder. I made sure it was indexed correctly. However, when I ran the query explain of the below query, the index was not being used. The index definition is supposed to improve the query below because it is trying to access the descendent nodes inside costco homepage.
SELECT s FROM [nt:base] AS s WHERE ISDESCENDANTNODE([/content/costco/homepage/jcr:content])
The warning I got from index definition is:
no proper index was found for filter Filter(query=explain SELECT s FROM [nt:base] AS s WHERE ISDESCENDANTNODE([/content/costco/homepage/jcr:content]) , path=/content/costco/jcr:content//*) Traversal query (query without index): explain SELECT s FROM [nt:base] AS s WHERE ISDESCENDANTNODE([/content/costco/homepage/jcr:content]) ; consider creating an index
Here's the index definition I used:
<pageDecendents jcr:primaryType="oak:QueryIndexDefinition"
reindex="{Boolean}true"
reindexCount="{Long}1"
seed="{Long}-4679589122988751568"
type="path">
<includedPaths jcr:primaryType="nt:unstructured">
<content jcr:primaryType="nt:unstructured" includePatterns="/content/costco/.*"/>
</includedPaths>
<indexRules jcr:primaryType="nt:unstructured">
<nt:base jcr:primaryType="nt:unstructured">
<properties jcr:primaryType="nt:unstructured">
<path jcr:primaryType="nt:unstructured" name="jcr:path" nodeScopeIndex="{Boolean}true" propertyIndex="{Boolean}false" unique="{Boolean}false"/>
</properties>
</nt:base>
</indexRules>
</pageDecendents>
Am I missing anything? Thanks