Elasticsearch version (bin/elasticsearch --version): 7.9.1
Plugins installed: []
JVM version (java -version): (build 1.8.0_241-b07) version 8 update 241
OS version (uname -a if on a Unix-like system): OSX 10.14.6 uname -a output: 18.7.0 Darwin Kernel Version 18.7.0: Mon Aug 31 20:53:32 PDT 2020; root:xnu-4903.278.44~1/RELEASE_X86_64 x86_64
Description of the problem including expected versus actual behavior:
Bulk requests containing doc index requests for children docs that are missing the routing of the parent ID yields a misleading/ unhelpful error, e.g. org.elasticsearch.index.mapper.MapperParsingException: failed to parse field [relation_type] of type [text] in document with id '1FSwMnUBA8KBi0F-W-PG' and "Caused by: java.lang.IllegalStateException: Can't get text on a START_OBJECT at 1:147" (see logs below).
Steps to reproduce:
Please include a minimal but complete recreation of the problem,
including (e.g.) index creation, mappings, settings, query etc. The easier
you make for us to reproduce it, the more likely that somebody will take the
time to look at it.
Execute a bulk request with Index Requests for child docs with the parent ID specified but WITHOUT the routing param (which should be the parent doc's ID for the given child).
Provide logs (if relevant):
"stacktrace": ["org.elasticsearch.index.mapper.MapperParsingException: failed to parse field [relation_type] of type [text] in document with id '1FSwMnUBA8KBi0F-W-PG'. Preview of field's value: '{parent=cACd4_bkQr-0Dk24W-eREC_UXr3gSbKosmtPaDLJffk, name=entity}'",
"at org.elasticsearch.index.mapper.FieldMapper.parse(FieldMapper.java:259) ~[elasticsearch-7.9.1.jar:7.9.1]",
"at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrField(DocumentParser.java:485) ~[elasticsearch-7.9.1.jar:7.9.1]",
"at org.elasticsearch.index.mapper.DocumentParser.parseObject(DocumentParser.java:502) ~[elasticsearch-7.9.1.jar:7.9.1]",
"at org.elasticsearch.index.mapper.DocumentParser.innerParseObject(DocumentParser.java:415) ~[elasticsearch-7.9.1.jar:7.9.1]",
"at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrNested(DocumentParser.java:392) ~[elasticsearch-7.9.1.jar:7.9.1]",
"at org.elasticsearch.index.mapper.DocumentParser.internalParseDocument(DocumentParser.java:109) ~[elasticsearch-7.9.1.jar:7.9.1]",
"at org.elasticsearch.index.mapper.DocumentParser.parseDocument(DocumentParser.java:68) ~[elasticsearch-7.9.1.jar:7.9.1]",
"at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:266) ~[elasticsearch-7.9.1.jar:7.9.1]",
"at org.elasticsearch.index.shard.IndexShard.prepareIndex(IndexShard.java:799) ~[elasticsearch-7.9.1.jar:7.9.1]",
"at org.elasticsearch.index.shard.IndexShard.applyIndexOperation(IndexShard.java:776) ~[elasticsearch-7.9.1.jar:7.9.1]",
"at org.elasticsearch.index.shard.IndexShard.applyIndexOperationOnPrimary(IndexShard.java:748) ~[elasticsearch-7.9.1.jar:7.9.1]",
"at org.elasticsearch.action.bulk.TransportShardBulkAction.executeBulkItemRequest(TransportShardBulkAction.java:274) [elasticsearch-7.9.1.jar:7.9.1]",
"at org.elasticsearch.action.bulk.TransportShardBulkAction$2.doRun(TransportShardBulkAction.java:164) [elasticsearch-7.9.1.jar:7.9.1]",
"at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-7.9.1.jar:7.9.1]",
"at org.elasticsearch.action.bulk.TransportShardBulkAction.performOnPrimary(TransportShardBulkAction.java:209) [elasticsearch-7.9.1.jar:7.9.1]",
"at org.elasticsearch.action.bulk.TransportShardBulkAction.dispatchedShardOperationOnPrimary(TransportShardBulkAction.java:116) [elasticsearch-7.9.1.jar:7.9.1]",
"at org.elasticsearch.action.bulk.TransportShardBulkAction.dispatchedShardOperationOnPrimary(TransportShardBulkAction.java:82) [elasticsearch-7.9.1.jar:7.9.1]",
"at org.elasticsearch.action.support.replication.TransportWriteAction$1.doRun(TransportWriteAction.java:161) [elasticsearch-7.9.1.jar:7.9.1]",
"at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:710) [elasticsearch-7.9.1.jar:7.9.1]",
"at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-7.9.1.jar:7.9.1]",
"at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) [?:?]",
"at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) [?:?]",
"at java.lang.Thread.run(Thread.java:832) [?:?]",
"Caused by: java.lang.IllegalStateException: Can't get text on a START_OBJECT at 1:147",
"at org.elasticsearch.common.xcontent.json.JsonXContentParser.text(JsonXContentParser.java:85) ~[elasticsearch-x-content-7.9.1.jar:7.9.1]",
"at org.elasticsearch.common.xcontent.support.AbstractXContentParser.textOrNull(AbstractXContentParser.java:253) ~[elasticsearch-x-content-7.9.1.jar:7.9.1]",
"at org.elasticsearch.index.mapper.TextFieldMapper.parseCreateField(TextFieldMapper.java:808) ~[elasticsearch-7.9.1.jar:7.9.1]",
"at org.elasticsearch.index.mapper.FieldMapper.parse(FieldMapper.java:240) ~[elasticsearch-7.9.1.jar:7.9.1]",
"... 22 more"] }
Elasticsearch version (
bin/elasticsearch --version
): 7.9.1Plugins installed: []
JVM version (
java -version
): (build 1.8.0_241-b07) version 8 update 241OS version (
uname -a
if on a Unix-like system): OSX 10.14.6 uname -a output: 18.7.0 Darwin Kernel Version 18.7.0: Mon Aug 31 20:53:32 PDT 2020; root:xnu-4903.278.44~1/RELEASE_X86_64 x86_64Description of the problem including expected versus actual behavior: Bulk requests containing doc index requests for children docs that are missing the routing of the parent ID yields a misleading/ unhelpful error, e.g.
org.elasticsearch.index.mapper.MapperParsingException: failed to parse field [relation_type] of type [text] in document with id '1FSwMnUBA8KBi0F-W-PG'
and"Caused by: java.lang.IllegalStateException: Can't get text on a START_OBJECT at 1:147"
(see logs below).Steps to reproduce:
Please include a minimal but complete recreation of the problem, including (e.g.) index creation, mappings, settings, query etc. The easier you make for us to reproduce it, the more likely that somebody will take the time to look at it.
Provide logs (if relevant):