The scripts/fresh-indices/fresh-indices.sh script currently supports a create command which creates a new ElasticSearch index with a time-stamped name, and fills it documents created using current Neo4j data. search-api/issues/855 will allow the index to be further updated with post-create data until up-to-date with Neo4j.
Existing functionality in the ESManager class supports ElasticSearch operations which are not related to document CRUD. Use this functionality to implement a new command supported by fresh-indices.sh with a name like swap, maybe go-live, etc.
This command should rename the current active index to something so it is possible to restore it, should rename the newly created index to the name of the active index in search-api's search-config.yaml, and wait for the indices to have "green" health. E.g.
The
scripts/fresh-indices/fresh-indices.sh
script currently supports acreate
command which creates a new ElasticSearch index with a time-stamped name, and fills it documents created using current Neo4j data. search-api/issues/855 will allow the index to be further updated with post-create
data until up-to-date with Neo4j.Existing functionality in the ESManager class supports ElasticSearch operations which are not related to document CRUD. Use this functionality to implement a new command supported by
fresh-indices.sh
with a name likeswap
, maybego-live
, etc.This command should rename the current active index to something so it is possible to restore it, should rename the newly created index to the name of the active index in
search-api
'ssearch-config.yaml
, and wait for the indices to have "green" health. E.g.hm_prod_consortium_entities
becomesflush20240812_hm_prod_consortium_entities
fill20240812_hm_prod_consortium_entities
becomeshm_prod_consortium_entities
search-api
is restarted as necessaryThe existing "log-indexing-oss" process, from which "fresh-indices" code was derived, does something very similar to this already, after creating and filling.