Aem oak index | Community
Skip to main content
New Participant
April 9, 2025
Solved

Aem oak index

  • April 9, 2025
  • 2 replies
  • 740 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.

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

Tethich
TethichAccepted solution
New Participant
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

 

narendiran_ravi
New Participant
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.