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

Support dots in field names when mapping already exists #17759

Merged
merged 3 commits into from
Apr 18, 2016

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented Apr 14, 2016

In 2.0 we began restricting fields to not contains dots in their names.
This change adds back part of dots in fieldnames support. Specifically,
it allows indexing documents that contain dots in the field names, when
the correct corresponding mappers exist. For example, if mappings
contain an object field foo, and a subfield bar, then indexing a
document with foo.bar will work.

see #15951

In 2.0 we began restricting fields to not contains dots in their names.
This change adds back part of dots in fieldnames support. Specifically,
it allows indexing documents that contain dots in the field names, when
the correct corresponding mappers exist. For example, if mappings
contain an object field `foo`, and a subfield `bar`, then indexing a
document with `foo.bar` will work.

see elastic#15951
@rjernst rjernst added :Search Foundations/Mapping Index mappings, including merging and defining field types v5.0.0-alpha2 labels Apr 14, 2016
.field("baz", 789)
.endObject()
.endObject().bytes();
ParsedDocument doc = mapper.parse("test", "type", "1", bytes);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's check that doc.dynamicMappingsUpdate() is null? (ie. there is no mapping update)

@jpountz
Copy link
Contributor

jpountz commented Apr 18, 2016

LGTM

@djschny
Copy link
Contributor

djschny commented Apr 25, 2016

I noticed this is only tagged for v5.0.0 however this is still holding people back from upgrading from 1.x to 2.x so therefore I would think this would be crucial because 5.x won't be able to read Lucene 4 index formats which I believe was the newest version of Lucene that 1.x ES supported.

Thoughts or am I missing a way someone can upgrade straight from 1.x -> 5.x?

@clintongormley
Copy link

@djschny it's looking like it will not be possible to backport this feature to 2.x, as it relies on too many mapping changes that have happened in master.

Thoughts or am I missing a way someone can upgrade straight from 1.x -> 5.x?

We will be building a reindex-from-remote solution which would allow importing indices from a 1.x cluster directly into 5.x

@djschny
Copy link
Contributor

djschny commented Apr 26, 2016

We will be building a reindex-from-remote solution which would allow importing indices from a 1.x cluster directly into 5.x

OK so for folks that are anxiously waiting this change and cannot upgrade to 2.x because of it, our recommendation is for them to jump straight to 5.x and either re-index themselves or wait until a 5.x release has the planned "reindex-from-remote" solution?

I know you did a great job recently updating the migration plugin for 5.x, if installed in a 1.x cluster will it give recommendations on actions that need to be taken for an upgrade to 5.x?

I just want to make sure I advise folks out in the field appropriately since this comes up quite frequently.

@clintongormley clintongormley changed the title Mappings: Support dots in field names when mapping exists Support dots in field names when mapping exists May 2, 2016
@clintongormley clintongormley changed the title Support dots in field names when mapping exists Support dots in field names when mapping already exists May 2, 2016
@nellicus
Copy link
Contributor

+1
wondering whether we can officially educate/advise around this for users who plan to be on 1.x when 5.0 will go GA thus avoiding the de-dot exercise pain

@otisg
Copy link

otisg commented May 26, 2016

We will be building a reindex-from-remote solution which would allow importing indices from a 1.x cluster directly into 5.x

@clintongormley Sounds good. Is there an issue for that to which one could subscribe?

@djschny
Copy link
Contributor

djschny commented May 26, 2016

@otisg See issue #17447

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search Foundations/Mapping Index mappings, including merging and defining field types v5.0.0-alpha2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants