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.

2 questions in relation to custom OAK indexes

Avatar

Level 9

1. How do I commit to my project code custom indexes for AEM 6.x? I've searched the net but nothing comes up.

 

2. Is there a way to easily translate a SQL2 to custom index XML? I found this site => https://oakutils.appspot.com/generate/index but the output available is JSON only. I'm wondering if XML output is available. I have not seen any Adobe guide or sample code where JSON is used to define a custom index.

 

Thanks for the help.

1 Reply

Avatar

Community Advisor

Hi @jayv25585659,

  1. Store index definition into the AEM project at ui.apps/src/main/content/jcr_root/_oak_index.
    For more details refer: https://experienceleague.adobe.com/en/docs/experience-manager-learn/foundation/development/understan...
  2. Unfortunately, Adobe/AEM does not currently provide an official tool that automatically generates index XML from SQL2 queries. Adobe and Oak still use XML format for defining indexes in JCR content structure (used by AEM).

One thing you could try to simplify the process is to convert them into JSON or SQL2 format, and then leverage an AI tool for assistance to get XML.

Hope that helps!


Santosh Sai

AEM BlogsLinkedIn