-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
Inconsistent results between template-applied Index Alias and manually-applied Index Alias filters #6110
Comments
Replicated in master. It looks like the filter is created before the mapping, and isn't updated after the mapping is changed. The
While for the alias created after the mapping is in place is:
This has nothing to do with the filter caching. Slightly simplified recreation:
|
I confirm @clintongormley's diagnosis. This happens specifically with terms filter lookup since the filter gets parsed upon index creation, before the dynamic mapping gets created. Same reproduces with ordinary aliases too if created before the first document gets indexed (just creating an empty index before creating the alias):
A work around till we find a proper way to solve it is to manually create the index specifying its mappings before indexing the first document. This way the filter gets created after the mapping is parsed:
|
Thank you, that helps a lot! |
Glad to hear @cvializ ! One thing I missed is that you can also add the mappings to your template, that would make things nicely work without needing to manually create the index upfront:
|
Fixed by #6664 |
I'm confused how this got fixed with #6664 and marked closed. Without @javanna 's workaround, @clintongormley 's slightly simplified recreation fails in 1.4.0 with {
"error": "ElasticsearchIllegalArgumentException[failed to parse filter for alias [template-admin-logstash-2014.05.09]]; nested: QueryParsingException[[logstash-2014.05.09] Strict field resolution and no field mapping can be found for the field with name [host]]; ",
"status": 400
} If |
@loren not following exactly. In my example, the
|
I am using Logstash, ElasticSearch 1.1.1 and Kibana to allow groups of users to view logs for their machines. I'd like to use an Index Template to automatically add the Index Alias Filter to the Logstash indices when they are created.
However, the template-added alias filters return inconsistent results, as you can see by running my Gist recreation https://gist.github.com/cvializ/0a494579e19e645ecd4a
A manually created index alias filter returns the correct results as expected. I believe this to be a bug in Elasticsearch.
The text was updated successfully, but these errors were encountered: