# Object mapping for \[Type/Collection\] with array for \[Key/Nestedfield\] tried to parse as array, but got EOF, is there a mismatch in types for the same field?

**URL:** <https://discuss.elastic.co/t/object-mapping-for-type-collection-with-array-for-key-nestedfield-tried-to-parse-as-array-but-got-eof-is-there-a-mismatch-in-types-for-the-same-field/22681>\
**Category:** Elasticsearch\
**Created:** [March 16, 2015, 10:42am UTC](https://discuss.elastic.co/t/object-mapping-for-type-collection-with-array-for-key-nestedfield-tried-to-parse-as-array-but-got-eof-is-there-a-mismatch-in-types-for-the-same-field/22681 "2015-03-16T10:42:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kishankachchhi](https://avatars.discourse-cdn.com/v4/letter/k/67e7ee/32.png) [@kishankachchhi](https://discuss.elastic.co/u/kishankachchhi)\
**Post date:** [March 16, 2015, 10:42am UTC](https://discuss.elastic.co/t/object-mapping-for-type-collection-with-array-for-key-nestedfield-tried-to-parse-as-array-but-got-eof-is-there-a-mismatch-in-types-for-the-same-field/22681/1 "2015-03-16T10:42:19Z")

</div>

I am using mongodb-river with mapper-attachments.

Config-\>Elasticsearch.yml has edited to

threadpool.bulk.type: fixed  
threadpool.bulk.size: 2 # availableProcessors  
threadpool.bulk.queue\_size: 5000000

* * *

While I am defining the meta for particular river got an error like:

failed to execute bulk item (index) index {[index][type][data with nested array obj]  
\<......Data.....\>  
\<......Data.....\>  
org.elasticsearch.index.mapper.MapperParsingException: object mapping for [TypeName] with array for [Field] tried to parse as array, but got EOF, is there a mismatch in types for the same field?

at org.elasticsearch.index.mapper.object.ObjectMapper.serializeNonDynamicArray(ObjectMapper.java:694)  
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeArray(ObjectMapper.java:623)  
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:492)  
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:541)  
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:490)  
at org.elasticsearch.index.shard.service.InternalIndexShard.prepareIndex(InternalIndexShard.java:413)  
at org.elasticsearch.action.bulk.TransportShardBulkAction.shardIndexOperation(TransportShardBulkAction.java:435)  
at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:150)  
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:511)  
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:419)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
at java.lang.Thread.run(Thread.java:745)

* * *

Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:26am UTC](https://discuss.elastic.co/t/object-mapping-for-type-collection-with-array-for-key-nestedfield-tried-to-parse-as-array-but-got-eof-is-there-a-mismatch-in-types-for-the-same-field/22681/2 "2017-07-06T00:26:35Z")

</div>


