-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Defining default_index and default_search analyzers sets type-level index and search analyzers #13134
Comments
@rayward You can certainly still define a default analyzer. Previously there were two different levels of default analyzer you could set. The first was on the entire index. The second was on each type. The latter was removed with 2.0 (see the reasoning in #8874), but the default analyzer can still be set on the entire index. If you remove the |
@rjernst thanks for clarifying, I think it's just a bit confusing because I never explicitly specified the type-level analyzers on the mapping, ES picked it up from from the index level settings. I'm not even sure how to even remove them actually (perhaps because they're not actually set on the
Nor will it even let me change it:
The mapping still looks the same:
Am I doing something fundamentally wrong? |
It sounds like the get mappings on 1.x always output the type level if it was "set", even if by specifying an index level default. I think this should actually work when upgrading (it will just be ignored). It looks like this is a test index. Would you mind trying the upgrade and reporting back? @clintongormley can speak to how we might improve the migration plugin to detect this situation (and not error in that case). |
I'll reopen for now, until we determine how to improve the migration plugin and/or if there is work needed to allow the upgrade error free in this case. |
@rayward thanks for pointing this out. I'll move the issue to the migration repo and address this there |
This issue was moved to elastic/elasticsearch-migration#23 |
The migration plugin is complaining that I have type-level analyzers configured for all my types:
I've pinned it down to the
default_index
anddefault_search
definitions on the index analysis settings.Is the how the intended behaviour of
default_index
anddefault_search
(to set type-level analyzers)?Does this mean in 2.0 I have to explicitly set the analyzers for all string fields now rather than being able to use a default that I define?
Perhaps the docs for default analyzers also needs updating then?
https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-analyzers.html#default-analyzers
The text was updated successfully, but these errors were encountered: