As a part of the migration to a new Elastic 7 we need some functionality
that will allow us to do full reindex of Records registered in Storage service.
Added new endpoint: PATCH /api/indexer/v2/reindex?force_clean=false
- Get all kind from Storage
- Clean all old indexes in Elastic
- Iterate over kinds and do reindex
How to test:
Functionality was tested locally, with local elastic(v6 & v7)
Refactor (a non-breaking change that improves code maintainability).
Bugfix (a non-breaking change that solves an issue).
New feature (a non-breaking change that adds functionality).
Breaking change (a change that is not backward-compatible and/or changes current functionality).
Existing Tests pass
Verified functionality locally
Self Reviewed my code for formatting and complex business logic.
Functionality was implemented with reusing existing logic for reindex of a single kind, to reduce common code changes, thus due to architectural features, request cannot be executed asynchronously, and response may be detained.