Include Parent Path in Index Definition
I have more than 1000 pages to query and the query will traverse nodes inside each page node to get component nodes. Let's assume all these pages are under the same parent node: /content/costco/, and this is what queries look like:
SELECT page.[jcr:path] FROM [nt:base] AS s WHERE ISDESCENDANTNODE([/content/costco/homepage1/jcr:content])
SELECT page.[jcr:path] FROM [nt:base] AS s WHERE ISDESCENDANTNODE([/content/costco/homepage2/jcr:content])
SELECT page.[jcr:path] FROM [nt:base] AS s WHERE ISDESCENDANTNODE([/content/costco/homepage3/jcr:content])
However, if I add index definition, it will need to include page paths one by one like below.
<homepageDescendants
jcr:primaryType="oak:QueryIndexDefinition"
type="path"
reindex="true">
<indexRules jcr:primaryType="nt:unstructured">
<nt:base jcr:primaryType="nt:unstructured">
<properties jcr:primaryType="nt:unstructured">
<path jcr:primaryType="nt:unstructured"
name="jcr:path"
unique="false"/>
</properties>
</nt:base>
</indexRules>
<includedPaths jcr:primaryType="nt:unstructured">
<content jcr:primaryType="nt:unstructure name="/content/costco/homepage1/jcr:content"/>
<content jcr:primaryType="nt:unstructure name="/content/costco/homepage2/jcr:content"/>
<content jcr:primaryType="nt:unstructure name="/content/costco/homepage3/jcr:content"/>
</includedPaths>
</homepageDescendants>
So if I have thousands of pages, I will need to create thousands of index definition. I was wondering if there's any way to add 1 index definition on its parent path such as /content/costco/:
<includedPaths jcr:primaryType="nt:unstructured">
<content jcr:primaryType="nt:unstructure name="/content/costco/jcr:content"/>
</includedPaths>

