Recently I got an email from my AEM Admin about the indexing issue. The email had some content as shown below.
"WARN* [qtp1832135175-163] org.apache.jackrabbit.oak.spi.query.Cursors$TraversingCursor Traversed 10,000 nodes with filter Filter(query=select * from [nt:base] where foo = 'bar', path=*, property=[foo=[bar]]); consider creating an index "
Some times while working on AEM, we may face traversal warnings. The latest AEM doesn't index the nodes by default. So to ensure our content gets indexed well within AEM, we will have to create indexing nodes and get them indexed.
Below given steps to fix index issues
- Use the Oak index generation tool - generate index definition.
- Add the indexing under node oak:index.
- Trigger the re-index.
When we find an issue with a query(traversal warning !), we can use below tool to analyze the query.
Query Performance tool URL
http://[AEM URL]:[PORT]/libs/granite/operations/content/diagnosistools/queryPerformance.html
If the analysis recommends to index the nodes, we can use below Oak Index tool to generate the index definitions.
Oak Index Definition Generator in AEM
http://oakutils.appspot.com/generate/index
How to validate the index operation is done?
The indexing property becomes 'false' once the indexing has been completed.
Also, in the console we can go and validate it from index diagnosis tool > index manager
http://[AEM URL]:[PORT]/libs/granite/operations/content/diagnosistools/indexManager.html
Notes:
- We can even use Synonym file to index the synonyms in AEM.
- We can define multiple indexes together and trigger them parallel without any issues.
Demo Video
No comments:
Post a Comment