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
Mapping: MapperParsingException when create default mapping with 'include_in_all' nested #6304
Comments
HI @JeffreyZZ That mapping is incorrect. You're probably looking for:
|
Make sense. Thanks @clintongormley ! |
Are you sure? According to http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-root-object-type.html, it says:
and in http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-object-type.html, it says:
Greets, Sebastian |
You're absolutely right - this is a regression. /cc @brwe |
include_in_all can also be set on type level (root object). This fixes a regression introduced in elastic#6093 closes elastic#6304
Yes, opened pull request #6353 |
You could create a dynamic template for the types (example below). "include_in_all" will then not be set in the root object but still be applied to all fields and objects. As for the impact, if "include_in_all" is already set in the root type and you upgrade to 1.2, a MapperParsingException will be thrown on startup. The next time that the type mapping is updated, the "include_at_all" setting will be removed. Unfortunately, I found that a side effect seems to be that it will not only be removed from the root object, but also from fields. I'll have to look into this further. "include_in_all" via "dynamic_template":
Result should be
|
Seems this regression also has impact on the index template if the template defines 'include_in_all' under the type. It allows you to create the template but you're NOT able to create the index of the template in ES 1.2.0. There is the repro steps : [Step 1] create the following index template against ES 1.2.0 cluster [Step 2] Try to index this the following document [Result] [Expected] Try the above steps against ES 1.1.1, it works. Any workaround? |
There is unfortunately no workaround. |
@brwe Thanks for reply! BTW, any ETA for ES 1.2.1 release? |
We released yesterday: http://www.elasticsearch.org/blog/elasticsearch-1-2-1-released/ |
@brwe Excellent, thank you! |
Your mapping is invalid. I'm assuming the intent of the above is to create the type In this case, the
Also, I really recommend doing something like this with index templates, rather than with config files. It is much easier to manage such things via the API instead of via static config files. |
include_in_all can also be set on type level (root object). This fixes a regression introduced in elastic#6093 closes elastic#6304
One noticeable issue found with ES 1.2.0 during our deployment is that it threw exception when created default mappings with ‘include_in_all’ nested under it (doesn’t matter it’s set to true/false). For example, the following index creation command returns error when against ES 1.2.0 but it works well against ES 1.1.1
PUT test
{
"mappings": {
"default": {
"include_in_all": true
}
}
}
Result
{
"error": "MapperParsingException[mapping [default]]; nested: MapperParsingException[Root type mapping not empty after parsing! Remaining fields: [include_in_all : true]]; ",
"status": 400
}
Is this a regression with ES 1.2.0?
The text was updated successfully, but these errors were encountered: