-
-
Notifications
You must be signed in to change notification settings - Fork 167
correct config.schema.indexName reference
#1691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
config.schema.indexName reference
|
Hmm actually this is wrong too @orangejulius sanity check plz, am I doing the right thing? |
|
|
|
Oh I'm blind, it is duplicated in the config: Do we need both? |
|
Oh wow, this goes back to 2016, now I'm afraid to change anything: |
|
I would advocate removing The reason is that when you create an index you can change Is there a valid use-case where someone might want |
|
audit of our repos (we use a mix, and in some cases default to https://github.com/search?q=org%3Apelias%20indexName&type=code |
|
So, we originally created the distinction between the two But in general, I think it's potentially useful to some people to have both. The way I always imagined it works is for someone who only has a single, long lived Elasticsearch cluster to be able to switch the API between multiple indices, and also create new indices and run builds while keeping an old one around for production traffic. Something like the style of a blue-green deployment. The importers also use
|
|
OK, fair enough, I'm going to close this as a |
|
For anyone who find this issue in the future, a blue-green deployment can be achieved more simply using Elasticsearch Aliases with zero-downtime. |
|
Ah, I remember the issue we had at Mapzen now: normally, we loaded builds in to Elasticsearch with an index name of the format But then at some point something was messed up in our very convoluted and painful infrastructure setup, and we loaded an index into the cluster directly as I think having the configurability here in the API is still good, many people might prefer making changes to Pelias config instead of using Elasticsearch index aliases (one could imagine an infrastructure setup with read-only access to the Elasticsearch cluster for safety, but easy ways to change |
The
indexNameconfiguration is parented byschema, not byapi.ref: https://github.com/pelias/config/blob/4a52a15a85767407591deaabd78b4e87f09f74f7/config/defaults.json#L73
related: pelias/schema#507 (comment)