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

Closed
metysj opened this Issue Jun 3, 2014 · 0 comments

Comments

Projects
None yet
2 participants
@metysj
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:

https://gist.github.com/glade-at-gigwell/6408e0e4b69ddf2e8856

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(DocumentMapper.java:540)
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:462)
at      org.elasticsearch.index.shard.service.InternalIndexShard.prepareIndex(InternalIndexShard.java:384)
at      org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:203)
at      org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:556)
at      org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:426)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
 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(CompletionFieldMapper.java:237)
at      org.elasticsearch.index.mapper.object.ObjectMapper.serializeNullValue(ObjectMapper.java:505)
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:465)
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:515)
... 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.