Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ES index upgrades when using index aliases (#3863)
* Fix ES index upgrades when using index aliases ES supports fetching the index config for multiple indices in a single request. We don’t make use of this, but for this reason the ES responses are an object with a key for each requested index. For example: ```json { "aleph-entity-company-v1": { "settings": { ... }, "mappings: { ... } } } ``` In case an index is requested using an alias, the key will be the original index name and *not* the alias, i.e. we cannot rely on the key being the name that was used to request the index, as this would fail in case aliases are used. However, as we’re always requesting only a single index at a time, the response should always contain data for one index, so we can extract that without relying on the name of the index. * Combine handling of error cases As suggested by @stchris
- Loading branch information