Hi Team,
Is there any way to address below issue:
We need to make our custom oak indexes as part of code base and property "reindex" value is true. In this case after every code deploy, all indexes will run.
PROBLEM: How to make sure after every code deploy, these indexes do not run?
Is there any way to do it in more better way?
Regards,
KTNR
Solved! Go to Solution.
Hi @arvindpandey
Are you AMS or AEMaaCS ?
AEMaaCS run reindexing before deploying the code.This deployment initiates two jobs, responsible for adding (and merging if necessary) the index definitions to MongoDB and Azure Segment Store for author and publish, respectively. Prior to the switch, the underlying repositories undergo reindexing with the updated index definitions.
Please check https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/operations/index...
However you can deploy index from code on AMS/On-Prem/AEMaaCS from code base
Refer this document to add oak:index using the code. jackrabbit - How to create oak:index in AEM programatically - Stack Overflow
Thanks
Hi @arvindpandey
Are you AMS or AEMaaCS ?
AEMaaCS run reindexing before deploying the code.This deployment initiates two jobs, responsible for adding (and merging if necessary) the index definitions to MongoDB and Azure Segment Store for author and publish, respectively. Prior to the switch, the underlying repositories undergo reindexing with the updated index definitions.
Please check https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/operations/index...
However you can deploy index from code on AMS/On-Prem/AEMaaCS from code base
@arvindpandey can you please explain why you need to have reindex true property in codebase?
Absolutely, there are ways to address the issue of automatic reindexing after every code deployment with "reindex" set to true. Here are two approaches:
Use a Flag File:
oak_indexes_reindexed.flag
).Also, there is another way to do the same :
Thanks
If you are using AEM 6.x (and not AEM CS), you can use the Ensure Oak Index feature of ACS AEM Commons.
@arvindpandey Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
reindex property should not be present in the repo for deploying.
May i know what AEM version are you using and specific reason for having this property in repo