Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.
SOLVED

Aem oak index

Avatar

Level 3

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.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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/understan...

 

View solution in original post

2 Replies

Avatar

Level 8

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.

Avatar

Correct answer by
Community Advisor

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/understan...