We can re-synchronize the cached data in elastic search with the current data in the database with the following procedure:
1. Stop search indexer
2. Delete the Labregister item index
3. Restart search indexer
This will wipe out the cached Labregister items data in elastic search and then cause it to be rebuilt. These steps can be performed fairly quickly. In total, the steps would take about a minute to run. However, be aware that the rebuilding of Labregister item data might take an appreciable amount of time. This means that all users will temporarily lose their Labregister data until the rebuilding process is done.
To stop the search indexer:
kubectl scale --replicas=0 deployment/labfolder-labregister-chart-search-indexer
Wait about 10 - 15 seconds, then delete the Labregister item index:
kubectl exec -i -t service/elasticsearch-lf -c elasticsearch -- sh -c 'curl -X DELETE "http://localhost:9200/labregister_item?pretty"'
Wait about 20 -30 seconds, then restart search indexer:
kubectl scale --replicas=1 deployment/labfolder-labregister-chart-search-indexer
Now, the search indexer will begin rebuilding the Labregster item index in elastic search. Then, the time this takes to complete depends on how much data your installation has saved in Labregister. It may take a day to be fully restored. You can follow the progress of the search indexer with:
kubectl logs -f deployment/labfolder-labregister-chart-search-indexer -c labfolder-labregister-chart-search-indexer
Which shows you all search indexer logs. You can specifically check the completed initialization of Labregister data with:
kubectl logs deployment/labfolder-labregister-chart-search-indexer -c labfolder-labregister-chart-search-indexer | grep -iE 'Completed MDB Item Elastic Search Initialization at '
If this returns empty, then the initial restoration of lab register items is still in progress. Optionally, you can add the -f flag back into the previous command to have your terminal follow the logs but only output when the initialization is done:
kubectl logs -f deployment/labfolder-labregister-chart-search-indexer -c labfolder-labregister-chart-search-indexer | grep -iE 'Completed MDB Item Elastic Search Initialization at '
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article