-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Deprecate string in favor of text/keyword. #16877
Conversation
@rjernst could you have a look? |
* @param dynamicType the field type to give the field if the template does not define one | ||
* @param matchType the type of the field in the json document or null if unknown | ||
* @return a mapper builder, or null if there is no template for such a field | ||
*/ | ||
public Mapper.Builder findTemplateBuilder(ParseContext context, String name, String dynamicType, String matchType) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any calls to this version of findTemplateBuilder with matchType string
? Or findTemplate
below? very confusing how we have so many public variants of this method...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed this should be made simpler.
LGTM, just one comment which could be addressed in a followup. |
This commit removes the ability to use string fields on indices created on or after 5.0. Dynamic mappings now generate text fields by default for strings but there are plans to also add a sub keyword field (in a future PR). Most of the changes in this commit are just about replacing string with keyword or text. Some tests have been removed because they existed because of corner cases of string mappings like setting ignore-above on a text field or enabling term vectors on a keyword field which are now impossible. The plan is to remove strings entirely in 6.0.
066b56f
to
eef19be
Compare
@jpountz I think if this removes |
I added the breaking label. Regarding documentation, I'm keeping it for later so that the docs can deliver a consistent message about #12394 (I have not documented the text and keyword fields either yet). |
Makes sense, I just don't want to forget it! :) |
With regard to documentation/messaging for this, I just want to underscore how impactful this break can be, so we should make sure to highlight it as clearly as possible when we launch 5.0. This broke the mappings in Kibana, for example, so all CI builds are breaking and Kibana is uninstallable. We can fix master by updating our mappings for the .kibana index, but in order to support users upgrading their installs after the release, we need to either build into Kibana 5.0 an internal re-indexing feature or change Kibana to use versioned indexes behind a .kibana alias (which is our current consensus). |
@epixa This change is backwards compatible for existing indexes, and users will already need to reindex in order to take advantage of the numeric changes that will also happen in 5.0 (which come with Lucene 6). This only affected kibana tests since it creates new indexes, so I don't see it as a problem? |
I've come across a problem while trying to update the default mappings for the .kibana index. The current breaking changes guide states:
After switching our |
Thanks @rjernst, just the info I needed! |
Yeah, we're going to need to build out a reindexing-on-upgrade system in Kibana to support this correctly. We create mappings for Kibana objects on demand, and this is going to cause problems. For example, if a user has saved dashboards and visualizations, but they've never saved a search they'll have the |
This commit removes the ability to use string fields on indices created on or
after 5.0. Dynamic mappings now generate text fields by default for strings
but there are plans to also add a sub keyword field (in a future PR).
Most of the changes in this commit are just about replacing string with
keyword or text. Some tests have been removed because they existed because of
corner cases of string mappings like setting ignore-above on a text field or
enabling term vectors on a keyword field which are now impossible.
The plan is to remove strings entirely in 6.0.