add share.search.index_strategy to act as a slippery abstraction layer between search-engine backend and planned friendly search api
configure two index strategies (and make it easy to add more in the future):
sharev2_elastic5: the existing/legacy SHAREv2 search index as exists on elasticsearch5 and exposed via /api/v2/search/creativeworks/_search
sharev2_elastic8: a mirror/replacement for sharev2_elastic5 with all the same _source docs (but possible incompatibilities for the existing pass-thru api)
add a happy-path index-backfill workflow to the admin interface at /admin/search-indexes
when changing index-strategy settings/mappings/whatever, the "happy path" is to create, backfill, verify a new copy of the index; then switch which is used for searching, verify again, and finally delete the old index.
not intended to have the power of a full elasticsearch management interface -- just enough visibility to see whether things are going ok and where to start looking if something goes wrong
for testing, support indexStrategy query param to /api/v2/search/creativeworks/_search, /api/feeds/rss, /api/feeds/atom
may request a configured strategy (e.g. indexStrategy=sharev2_elastic8) or a specific version of an index within a strategy (e.g. indexStrategy=sharev2_elastic8__bcaa90e8fa8a772580040a8edbedb5f727202d1fca20866948bc0eb0e935e51f)
add FeatureFlag model, use it to switch default search strategy (name="elastic_eight_default")
Coverage: 91.835% (+7.3%) from 84.496% when pulling e538987c326a0eeb2766afa6fd278f35708732ce on aaxelb:quest/es8 into 21cd19c6c16216f6ec08876bcb83d6c645abdcdb on CenterForOpenScience:develop.
Coverage: 83.229% (-1.3%) from 84.496% when pulling ccf2904adae75b862b6c416bb2e923fc54b38ca4 on aaxelb:quest/es8 into 21cd19c6c16216f6ec08876bcb83d6c645abdcdb on CenterForOpenScience:develop.
share.search.index_strategy
to act as a slippery abstraction layer between search-engine backend and planned friendly search apisharev2_elastic5
: the existing/legacy SHAREv2 search index as exists on elasticsearch5 and exposed via/api/v2/search/creativeworks/_search
sharev2_elastic8
: a mirror/replacement forsharev2_elastic5
with all the same_source
docs (but possible incompatibilities for the existing pass-thru api)/admin/search-indexes
indexStrategy
query param to/api/v2/search/creativeworks/_search
,/api/feeds/rss
,/api/feeds/atom
indexStrategy=sharev2_elastic8
) or a specific version of an index within a strategy (e.g.indexStrategy=sharev2_elastic8__bcaa90e8fa8a772580040a8edbedb5f727202d1fca20866948bc0eb0e935e51f
)FeatureFlag
model, use it to switch default search strategy (name="elastic_eight_default"
)TODO:
-- cos jira ticket: ENG-4378