mediacloud / news-search-api

Internal API server that offers search access to the Media Cloud Online News Archive (in Elasticsearch).
https://mediacloud.org
GNU Affero General Public License v3.0
1 stars 3 forks source link

Index aliases #62

Closed pgulley closed 6 months ago

pgulley commented 6 months ago

Most direct way I could find to allow the alias name in, without the need to update any configuration in the story_indexer.

pgulley commented 6 months ago

As discussed elsewhere, the ideal way forward might be to just revert to manually passing the alias mc_search at launch and remove this discovery mechanism all together, but this allows things to be uncoupled.

thepsalmist commented 6 months ago

Referring to this. We can do search either by passing in all our indices, use the index pattern (in our case mc_search-), use the wildcards `all or ` or use the index_alias.

We're certain with ILM that we're going to have all indices created with the pattern mc_search-* and all mapped to the alias mc_search. So we might not need to make an API call to get all existing indices or aliases. If the Collection has to be an Enum, we can create from the list Collection = Enum("Collection", ["mc-search-*"])

pgulley commented 6 months ago

I'll merge shortly if no notes from @thepsalmist