# Optimizing indexing of documents containing large number of objects

**URL:** <https://discuss.elastic.co/t/optimizing-indexing-of-documents-containing-large-number-of-objects/20796>\
**Category:** Elasticsearch\
**Created:** [November 17, 2014, 8:05pm UTC](https://discuss.elastic.co/t/optimizing-indexing-of-documents-containing-large-number-of-objects/20796 "2014-11-17T20:05:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dragan\_Bosnjak](https://avatars.discourse-cdn.com/v4/letter/d/cc9497/32.png) [@Dragan\_Bosnjak](https://discuss.elastic.co/u/Dragan_Bosnjak)\
**Post date:** [November 17, 2014, 8:05pm UTC](https://discuss.elastic.co/t/optimizing-indexing-of-documents-containing-large-number-of-objects/20796/1 "2014-11-17T20:05:46Z")

</div>

Is there any way to make indexing of documents with large number of nested  
objects less dependent on memory?

I need to index documents containing array with up to million objects with  
this mapping:

```
'myobject': {
    'properties': {
        'name': {'type': 'string'},
        'foo': {'type': 'long'},
        'bar': {'type': 'long'}
    }
}

```

I have set mapping field \_all to`{"enabled" : false},` and it helped a lot,  
but for biggest files i still get OutOfMemoryError.  
I tried setting type both to "object" and "nested".

Any tips?

Thanks

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/aa99b9b8-e46a-4d94-a910-ea585c0935ec%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/aa99b9b8-e46a-4d94-a910-ea585c0935ec%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:49am UTC](https://discuss.elastic.co/t/optimizing-indexing-of-documents-containing-large-number-of-objects/20796/2 "2017-07-06T00:49:25Z")

</div>


