A customer is having trouble with some search queries and provides the following information:
* The logs show the following warning occurs many time: WARN* Traversed 1000 nodes with filter Filter (query=select...)
* The client has more than 100,000 stored in their AEM instance
* The client uses a custom page property to help search for pages of a given type
What should the AEM Developer do to help resolve the client's issue?
The warning WARN* Traversed 1000 nodes with filter Filter (query=select...) indicates that the query is performing a traversal instead of using an index. This results in poor performance, especially when the client has a large number of nodes (e.g., more than 100,000).
To resolve this issue, you should create a custom Oak index for the custom page property. This ensures that the queries can leverage the index for efficient data retrieval.
Steps to create a custom Oak index:
Define the Oak Index:
Navigate to the /oak:index node in CRXDE Lite (http://localhost:4502/crx/de).
Create a new node of type oak:QueryIndexDefinition.
Configure the Index:
Set the properties of the new index node to define the indexing rules for the custom page property.
{
'jcr:primaryType': 'oak:QueryIndexDefinition',
'type': 'property',
'propertyNames': ['customPageProperty'],
'reindex': true,
'async': 'async'
}
Deploy and Reindex:
Save the changes and initiate a reindexing process.
Ensure that the reindex flag is set to true for the newly created index.
Validate the Index:
Use the Index Manager or the AEM Web Console to validate that the new index is enabled and functioning correctly.
By creating a custom Oak index for the custom page property, the queries will be optimized to use the index, significantly improving the search performance and resolving the client's issue.
Vanda
8 months agoAnnabelle
8 months agoGeraldine
8 months agoCecily
9 months agoPilar
9 months agoAllene
9 months agoViki
9 months agoKatina
10 months agoMatilda
10 months agoJade
10 months agoNobuko
10 months agoPatti
10 months agoGlory
10 months agoKenneth
10 months agoBeckie
1 year agoMary
1 year agoJackie
1 year agoLeota
1 year agoGoldie
2 years agoMisty
1 year agoMarci
1 year agoOnita
2 years agoJeffrey
1 year agoLigia
1 year agoNatalya
2 years agoShantell
2 years agoDana
1 year agoTalia
1 year agoGerald
2 years agoAdrianna
2 years agoEvangelina
2 years ago