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

Field names cannot contain the . character in Elasticsearch 2.0 #14594

Closed
digital-wonderland opened this issue Nov 6, 2015 · 6 comments
Closed

Comments

@digital-wonderland
Copy link

Starting with Elasticsearch 2.0 field names can not contain the . character anymore.

I like to use . as separator in field names while using _ instead of camel casing - i.e. docker.label.some_stuff instead of docker_label_some_stuff since it makes the parsing much easier.

Any chance field names with a . will be allowed in Elasticsearch 2.x?

See also https://discuss.elastic.co/t/field-name-cannot-contain/33251

@clintongormley
Copy link
Contributor

No. Dots are used in paths all over the place, to represent keys in an object. The fewer decision trees there are in the code, the less likely we're going to forget to implement something in a new area of code.

You could use dashes or slashes or a number of other characters instead.

@Yasaswani
Copy link

Yasaswani commented Jun 16, 2016

We have an existing index which is created using Elasticsearch 1.0.2. We are planning to upgrade to 2.3.3. Also we have some fields which have dots in the filed names. Can we use de-dot filter to convert the dots to another character in the existing index? ie.. we don't want to delete the index and create new index with the updated mappings. or does de-dot filter work only for the new fields added?

@clintongormley
Copy link
Contributor

@Yasaswani you can't unfortunately. reindexing is the only way forward

@nickwilmes
Copy link

I just ran into this issue when upgrading to 2.3. While it wouldn't be too hard to switch the dots to dashes or slashes, it goes against a lot of standards already in place. For example, one of my plugins is collecting data from docker, who's standard is dots as separators. ECS actually takes this one step further and enforces that standard. The are also many others that use the same standard (DNS and Java, just to name a few).

By not allowing dots, I am now going to have to keep converting back and forth which is not only annoying but also a source of confusion and possible bugs in the future.

@jhmartin
Copy link

+1 for consistency with java and Docker Metadata; https://docs.docker.com/engine/userguide/labels-custom-metadata/ describes how metadata should be namespaced similiar to Java using periods. This is prime data to be loaded into ElasticSearch via LogStash, and prohibiting periods adds needless conversions to the input data (and breaks the upgrade path).

@dakrone
Copy link
Member

dakrone commented Oct 27, 2016

Dots in field names are allowed in ES 2.4 and 5.0, this is an older issues. See: #19937

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants