Skip to content
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

Handling of _all field in indices migrated from 5.x to 6.0 #25068

Closed
imotov opened this issue Jun 6, 2017 · 5 comments
Closed

Handling of _all field in indices migrated from 5.x to 6.0 #25068

imotov opened this issue Jun 6, 2017 · 5 comments
Assignees
Labels
>bug :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v6.0.0-beta1

Comments

@imotov
Copy link
Contributor

imotov commented Jun 6, 2017

In #22144 we disabled _all field by default, which means that that unless _all was explicitly enabled in a 5.x mapping, it will be disabled in 6.0 after upgrade. In other words, 5.x indices with _all explicitly enabled will continue to work in 6.0 as before, while indices with _all not explicitly enabled will lose _all fields and will start to use our fallback mechanism for all fields queries.

After discussions with @archanid and @dakrone we couldn't come to a clear conclusion on how this situation should be handled. We see at least 2 options here.

  1. It can be fixed by updating all existing 5.x mappings to have _all explicitly enabled when the first 6.0 node shows up in the cluster.

  2. Alternatively we can just update our documentation that doesn't seem to explicitly say what happens to the existing mappings.

@imotov imotov added :Search Foundations/Mapping Index mappings, including merging and defining field types discuss >upgrade labels Jun 6, 2017
@clintongormley
Copy link
Contributor

clintongormley commented Jun 6, 2017

This is a bug. 5.x indices should keep working in the same way as before when the cluster is upgraded to 6.x. This means that _all should continue to be enabled by default for indices created in 5.x.

I'd also be OK with upgrading the 5.x mappings to make _all explicitly enabled, rather than introducing version logic into the default.

@rhoboat
Copy link

rhoboat commented Jun 6, 2017

@clintongormley @dakrone Can you help fill out the table? Given the 5.x scenario on the left, what should happen when they upgrade, and should we raise a deprecation issue in the migration tool?

5.x setting 6.0? Deprecation Issue?
"_all": { "enabled": false } no setting no
"_all": { "enabled": true } "_all": { "enabled": true } yes
nothing or improperly configured "_all": { "enabled": true } yes

@clintongormley
Copy link
Contributor

@archanid i've updated the table

@rhoboat
Copy link

rhoboat commented Jun 6, 2017

thanks @clintongormley Just to clarify, what I meant by "improperly configured", and I should have been more clear, is "_all": { } which is a possible thing. After talking with @imotov and @dakrone this morning we think that case is the same as "nothing". We'll still want to keep the "enabled": true functionality if the index was created in 5.x.

dakrone added a commit to dakrone/elasticsearch that referenced this issue Jun 8, 2017
When we disabled `_all` by default for indices created in 6.0, we missed adding
a layer that would handle the situation where `_all` was not enabled in 5.x and
then the cluster was updated to 6.0, this means that when the cluster was
updated the `_all` field would be disabled for 5.x indices and field values
would not be added to the `_all` field.

This adds a compatibility layer for 5.x indices where we treat the default
enabled value for the `_all` field to be `true` if unset on 5.x indices.

Resolves elastic#25068
@rhoboat
Copy link

rhoboat commented Jun 8, 2017

🎉

@javanna javanna added the Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v6.0.0-beta1
Projects
None yet
Development

No branches or pull requests

6 participants