bash repro.sh
{"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
{"error":"MapperParsingException[failed to parse]; nested:
ElasticsearchIllegalArgumentException[Unknown field name[field2], must be
one of [payload, input, weight, output]];
","status":400}MacBook-Boss:completionmapping glade$
On Sunday, May 18, 2014 1:40:06 PM UTC-7, Glade Luco wrote:
I'm implementing an autocomplete feature using the new(ish) completion
type. We are implementing it against a series of fields, and in some
cases one of the fields is null. When the 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.
I created a simple Gist to demonstrate the problem.
https://gist.github.com/glade-at-gigwell/6408e0e4b69ddf2e8856
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/d47721f2-1798-4dba-b88f-3b923db037dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.