Adobe Experience Manager: How to Handle the “Query Without Index Detected” Alert

Description description

AEM as a Cloud Service may send an alert email with the subject line “Query Without Index Detected.” This alert occurs when a query traverses the entire JCR node structure and may lead to performance degradation.

Example
Query Without Index Detected
select [ jcr:path] , [ jcr:score] , *
from [ sling:Mapping] as a
where [ sling:internalRedirect] is not null
  and [ sling:match] is not null
  and isdescendantnode(a, ‘/etc/map/https’)

Environment:
AEM as a Cloud Service

Resolution resolution

By analyzing the AEM logs, identify the program that triggered the query.
Depending on the purpose of the program and the number of nodes affected, consider one of the following approaches:

Step 1. Optimize the query
Step 2. Adjust the index configuration
Step 3. Consider alternative implementations that avoid such queries (for example, enumerating child elements under specific nodes)
Step 4. Ignore the alert if the process completes quickly and does not impact performance

For more information on optimizing queries and configuring indexes, consult the following best practice documentation:

[ 1] Content Search and Indexing
https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/operations/indexing

[ 2] Query and Indexing Best Practices
https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/operations/query-and-indexing-best-practices

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f