Reindex specific indices in ES administration
Summary
This is a follow-up to !17230 (closed) / !18254 (merged) / !20421 (merged).
Currently the UI has a global Reindex
button, which queues a reindexing job that forwards indexing requests to all configured ES indices.
We want to add a way to only reindex a specific index, to avoid putting load on an existing ES index when adding a second one (for e.g. migration purposes).
Note: "Reindexing" currently doesn't involve deleting existing ES documents, and will just try to index any missing data.
Improvements
- Refactor the involved backend services to limit indexing to a specific index.
- It's not clear yet how to do this, because our application-level code is "blind" to our gem-level multi-version proxies.
- Extend the
/elasticsearch_indices/reindex
API endpoint to accept an ID for an ES index. - Enable the per-index
Start indexing
button in the frontend, and pass the index ID to the API.- The button was already implemented in !20421 (merged), but is commented out.
Involved components
ee/app/assets/javascripts/elasticsearch/components/es_index_actions.vue
ee/app/services/elastic/index_projects_service.rb
ee/lib/api/elasticsearch_indices.rb
Edited by Markus Koller