hello @vasim12345
The tool seems to work with SQL queries.
So, you first need to transform your query to SQL equivalent.
Example: First query has equivalent as
select [jcr:path], [jcr:score], * from [cq:Page] as a where [jcr:content/cq:template] = '/conf/wknd/settings/wcm/templates/content-page-template' and [jcr:content/tag] in('wknd-shared:activity/skiing3', 'wknd-shared:activity/skiing2', 'wknd-shared:activity/skiing1') and isdescendantnode(a, '/content/wknd/us/en/magazine') /* xpath: /jcr:root/content/wknd/us/en/magazine//element(*, cq:Page)[(jcr:content/@cq:template = '/conf/wknd/settings/wcm/templates/content-page-template' and (jcr:content/@tag = 'wknd-shared:activity/skiing3' or jcr:content/@tag = 'wknd-shared:activity/skiing2' or jcr:content/@tag = 'wknd-shared:activity/skiing1'))] */ union select [jcr:path], [jcr:score], * from [cq:Page] as a where [jcr:content/cq:template] = '/conf/wknd/settings/wcm/templates/content-page-template' and [jcr:content/tag] in('wknd-shared:activity/skiing3', 'wknd-shared:activity/skiing2', 'wknd-shared:activity/skiing1') and isdescendantnode(a, '/content/wknd/us/en/adventures')
To get the equivalent
1. just enable logging as per https://aemtreasury.wordpress.com/2015/11/13/how-to-enable-logging-of-aem-query/
2. Execute the query in http://localhost:4502/libs/cq/search/content/querydebug.html
3. Equivalent would be logged something like
31.07.2023 12:21:45.812 *DEBUG* [[0:0:0:0:0:0:0:1] [1690786305738] GET /libs/cq/search/content/querydebug.html HTTP/1.1] org.apache.jackrabbit.oak.query.QueryImpl query execute select [jcr:path], [jcr:score], * from [cq:Page] as a where [jcr:content/cq:template] = '/conf/wknd/settings/wcm/templates/content-page-template' and [jcr:content/tag] in('wknd-shared:activity/skiing3', 'wknd-shared:activity/skiing2', 'wknd-shared:activity/skiing1') and isdescendantnode(a, '/content/wknd/us/en/magazine') /* xpath: /jcr:root/content/wknd/us/en/magazine//element(*, cq:Page)[(jcr:content/@cq:template = '/conf/wknd/settings/wcm/templates/content-page-template' and (jcr:content/@tag = 'wknd-shared:activity/skiing3' or jcr:content/@tag = 'wknd-shared:activity/skiing2' or jcr:content/@tag = 'wknd-shared:activity/skiing1'))] */ union select [jcr:path], [jcr:score], * from [cq:Page] as a where [jcr:content/cq:template] = '/conf/wknd/settings/wcm/templates/content-page-template' and [jcr:content/tag] in('wknd-shared:activity/skiing3', 'wknd-shared:activity/skiing2', 'wknd-shared:activity/skiing1') and isdescendantnode(a, '/content/wknd/us/en/adventures') /* xpath: /jcr:root/content/wknd/us/en/adventures//element(*, cq:Page)[(jcr:content/@cq:template = '/conf/wknd/settings/wcm/templates/content-page-template' and (jcr:content/@tag = 'wknd-shared:activity/skiing3' or jcr:content/@tag = 'wknd-shared:activity/skiing2' or jcr:content/@tag = 'wknd-shared:activity/skiing1'))] */ union select [jcr:path], [jcr:score], * from [cq:Page] as a where [jcr:content/cq:template] = '/conf/wknd/settings/wcm/templates/content-page-template' and [jcr:content/tag] in('wknd-shared:activity/skiing3', 'wknd-shared:activity/skiing2', 'wknd-shared:activity/skiing1') and isdescendantnode(a, '/content/wknd/us/en/about-us') /* xpath: /jcr:root/content/wknd/us/en/about-us//element(*, cq:Page)[(jcr:content/@cq:template = '/conf/wknd/settings/wcm/templates/content-page-template' and (jcr:content/@tag = 'wknd-shared:activity/skiing3' or jcr:content/@tag = 'wknd-shared:activity/skiing2' or jcr:content/@tag = 'wknd-shared:activity/skiing1'))] */
Please assure that the index that is generated is merged into the OOTB ones carefully. Adobe is always improving indexes. You might miss on something, if you consider only the one from the tool