Aem oak index | Community
Skip to main content
Level 2
April 9, 2025
Solved

Aem oak index

  • April 9, 2025
  • 2 replies
  • 741 views

Hi everyone,

 

When we use path in queries and while indexing why do we need to use included paths and excluded paths already we are filtering the query through path in our query?

Thanks in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Tethich

Hi @kkeerthi 

From the Adobe's best practice documentation:


"Use includedPaths and avoid excludedPaths property. Always set queryPaths value to the same value as includedPaths value."

 

https://experienceleague.adobe.com/en/docs/experience-manager-learn/foundation/development/understand-indexing-best-practices

 

2 replies

narendiran_ravi
Level 6
April 9, 2025

Hi @kkeerthi ,

Even if your query filters by a path, adding includedPaths and excludedPaths in the AEM index definition improves performance and efficiency.

 

includedPaths tells AEM to only index content under specific paths.

 

excludedPaths lets you skip paths that aren’t needed.

 

This helps in reducing the index size also Speed up indexing

Without these, the index applies to the whole repository, which can slow down query execution and indexing.

 

So, using them ensures your index is focused and optimized for your specific use case.

Tethich
Community Advisor
TethichCommunity AdvisorAccepted solution
Community Advisor
April 9, 2025

Hi @kkeerthi 

From the Adobe's best practice documentation:


"Use includedPaths and avoid excludedPaths property. Always set queryPaths value to the same value as includedPaths value."

 

https://experienceleague.adobe.com/en/docs/experience-manager-learn/foundation/development/understand-indexing-best-practices