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

Completion mapping type throws a misleading error on null value #6399

metysj opened this Issue Jun 3, 2014 · 0 comments


None yet
2 participants
Copy link

commented Jun 3, 2014

When a field is null, the completion mapping parser throws an error but it refers to the next field in the document, not the field with the completion type.

Another user had the same issue and reported it on your google group, but I don't see it here in the bug tracker. Here's the link he provided to reproduce the issue:

And the stack trace:

 {"acknowledged":true}[2014-05-18 13:40:24,150][INFO ][cluster.metadata         ] [Aelfyre Whitemane] [completion_type_cant_handle_the_null_truth] creating index, cause [api], shards [1]/[0], mappings []
 {"acknowledged":true}[2014-05-18 13:40:24,224][INFO ][cluster.metadata         ] [Aelfyre Whitemane] [completion_type_cant_handle_the_null_truth] create_mapping [object]
 {"acknowledged":true}[2014-05-18 13:40:24,245][INFO ][cluster.metadata         ] [Aelfyre Whitemane] [completion_type_cant_handle_the_null_truth] update_mapping [object] (dynamic)
 {"_index":"completion_type_cant_handle_the_null_truth","_type":"object","_id":"1","_version":1,"created":true}[2014-05-18 13:40:24,265][DEBUG][action.index             ] [Aelfyre Whitemane] [completion_type_cant_handle_the_null_truth][0], node[k4lbsgzYSlWzynQkVGqMaw], [P], s[STARTED]: Failed to execute [index      {[completion_type_cant_handle_the_null_truth][object][2], source[{"field1" : null,"field2" : "nulls make me sad"}]}]
 org.elasticsearch.index.mapper.MapperParsingException: failed to parse
at org.elasticsearch.index.mapper.DocumentMapper.parse(
at org.elasticsearch.index.mapper.DocumentMapper.parse(
at      org.elasticsearch.index.shard.service.InternalIndexShard.prepareIndex(
at      org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
 Caused by: org.elasticsearch.ElasticsearchIllegalArgumentException: Unknown field name[field2], must be one of [payload, input, weight, output]
at      org.elasticsearch.index.mapper.core.CompletionFieldMapper.parse(
at      org.elasticsearch.index.mapper.object.ObjectMapper.serializeNullValue(
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(
at org.elasticsearch.index.mapper.DocumentMapper.parse(
... 8 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.