I have created two site level indexes for page and asset indexing (myprojectUsIndex: /content/dam/myproject/us, myprojectAssetUsIndex: /content/myproject/us) and using query builder API to search in these paths. My query is as below.
fulltext=word
mainasset=true
1_group.p.or=true
1_group.1_group.path=/content/dam/myproject/us
1_group.2_group.path=/content/myproject/us
2_group.p.or=true
2_group.1_group.type=cq:Page
2_group.1_group.property=jcr:content/@sling:resourceType
2_group.1_group.property.value=dam/components/word/wordPage
2_group.1_group.property.operation=unequals
2_group.2_group.type=dam:Asset
2_group.2_group.p.and=true
2_group.2_group.1_group.p.or=true
2_group.2_group.1_group.1_property=jcr:content/metadata/@dc:format
2_group.2_group.1_group.1_property.1_value=application/pdf
2_group.2_group.1_group.1_property.2_value=application/vnd.openxmlformats-officedocument.wordprocessingml.document
2_group.2_group.1_group.1_property.or=true
2_group.2_group.1_group.2_property=jcr:content/metadata/@dam:MIMEtype
2_group.2_group.1_group.2_property.1_value=image/jpeg
2_group.2_group.1_group.2_property.2_value=image/gif
2_group.2_group.1_group.2_property.or=true
p.excerpt=true
p.limit=-1
When I run the query and check in Query Performance console (explain query), it shows that this query is using root level index (myprojectIndex, damAssetLucene) instead of site level index (myprojectUsIndex, myprojectAssetUsIndex). If i have only one path, then the corresponding site level index is used.
1) Why is the site level index not used when I have multiple path filter
2) My root level index (myprojectIndex) has index rules for both page and dam, with proper includedPaths property, then why is the same index not being used for assets as well (OOTB damAssetLucene is used)