ES sync job temporary workaround

Do an efficient and targeted resync

Given the sync process described here:
Elastic Search Rebuild Sync Job
We want to be able to “skip” step 6. Steps 1-5 take a couple of hours but don’t have a visible effect on the system (may impact data updates). Step 6 itself takes a further couple of hours and kills mongodb, and the UI will be down during this time.

We essentially want to disable step 6 (PR here) then manually do the following (Assuming the use of elasticVue UI:

  1. create index recommendationIndexBackup using PUT recommendationIndexBackup with a request body consisting of the json attatched

  2. reindex recommendationindex into recommendationIndexBackup using POST _reindex with a body similar to the image shown

  3. drop recommendationIndex

  4. create index recommendationindex using PUT recommendationindex with a request body consisting of the json attatched

  5. reindex masterdoctorindex into recommendationindex using POST _reindex with a body similar to the image shown (correct source and destination values)

  6. drop recommendationIndexBackup if not needed, or use to restore recommendationindex (using reindex) if necessary

These steps should be achievable in a few minutes

Users should still be warned of disruption during this process

Example of reindex: