Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Getting a list of pages and components | Querying vs Traversal

Avatar

Level 2

Hi,

We need to traverse our entire content repository and return a list of all pages and all the components authored in each of these pages.

The number of pages are high. I can think of the below ways and need views and suggestions from the community.

1. Using Queries. We need to run the query at each market level (eg content/domain/market1 , content/domain/market2 etc) and get the results. This works but since the number of nodes are pretty high, this takes quite some time (we are still trying to tune some indexes though)

2. The component Report which is available out of the box. Two questions here

     a. Will this report give back result in a json format?

     b. Does this report internally use queries only?

3. Write a custom code using Resource Resolvers and creating the required json.

Regards,

Manas

1 Accepted Solution

Avatar

Correct answer by
Level 7

Hi Manas,

2) Yes, the component report returns the result in json format.

Please hit the below URL to see the json data (Component report)

http://localhost:4502/etc/reports/compreport/jcr:content/report.data.json

1) To understand the best practices for querying and indexing, please refer:

https://docs.adobe.com/content/docs/en/aem/6-1/deploy/best-practices/best-practices-for-queries-and-...

Different ways to access JCR and their performance aspects are mentioned here:

https://cqdump.wordpress.com/2012/11/26/ways-to-access-your-content-with-jcr-part-1/

https://cqdump.wordpress.com/2012/11/28/ways-to-access-your-content-with-jcr-part-2-performance-aspe...

We hope this information helps!

Regards,

TechAspect Solutions

View solution in original post

3 Replies

Avatar

Correct answer by
Level 7

Hi Manas,

2) Yes, the component report returns the result in json format.

Please hit the below URL to see the json data (Component report)

http://localhost:4502/etc/reports/compreport/jcr:content/report.data.json

1) To understand the best practices for querying and indexing, please refer:

https://docs.adobe.com/content/docs/en/aem/6-1/deploy/best-practices/best-practices-for-queries-and-...

Different ways to access JCR and their performance aspects are mentioned here:

https://cqdump.wordpress.com/2012/11/26/ways-to-access-your-content-with-jcr-part-1/

https://cqdump.wordpress.com/2012/11/28/ways-to-access-your-content-with-jcr-part-2-performance-aspe...

We hope this information helps!

Regards,

TechAspect Solutions

Avatar

Level 10

Thanks Techaspect Solutions Pvt Ltd for the awesome community input!

Avatar

Level 2

Thanks for the great input.Let me try these options