# Search over large documents

**URL:** <https://discuss.elastic.co/t/search-over-large-documents/167768>\
**Category:** Elasticsearch\
**Created:** [February 10, 2019, 8:09pm UTC](https://discuss.elastic.co/t/search-over-large-documents/167768 "2019-02-10T20:09:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![makitka2007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/makitka2007/32/40768_2.png) [@makitka2007](https://discuss.elastic.co/u/makitka2007)\
**Post date:** [February 10, 2019, 8:09pm UTC](https://discuss.elastic.co/t/search-over-large-documents/167768/1 "2019-02-10T20:09:49Z")

</div>

hi all

we have an index in ES which we use both for search and display on UI for resource card. this card is shown for user when he clicks on a title from search results, and document is get there by it's id. so, about 10% fields are indexed, other 90% are just stored in index as source with "index: false".

does it make sense to split this data into 2 separate indexes - so, first one will contain only fields we need for search/filter/aggregate and display on search results page, and other will contain all remaining fields? will it improve search performance? or it doesn't matter a lot how big is document, because anyway ES uses inverted index for indexed fields and just read source documents then for found ones? will benefit of such splitting be significant here?

thanks in advance for answer

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 11, 2019, 1:11am UTC](https://discuss.elastic.co/t/search-over-large-documents/167768/2 "2019-02-11T01:11:08Z")

</div>

It'll make a difference when it needs to do the fetch phase of a search. [The overview here](https://www.elastic.co/guide/en/elasticsearch/guide/current/_fetch_phase.html) is for an older Elasticsearch version, but it's still valid.

---

<div class="post-metadata">

**Author:** ![makitka2007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/makitka2007/32/40768_2.png) [@makitka2007](https://discuss.elastic.co/u/makitka2007)\
**Post date:** [February 11, 2019, 8:22am UTC](https://discuss.elastic.co/t/search-over-large-documents/167768/3 "2019-02-11T08:22:14Z")

</div>

so, on search phase performance will be quite the same for both cases, right?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [February 11, 2019, 8:31am UTC](https://discuss.elastic.co/t/search-over-large-documents/167768/4 "2019-02-11T08:31:39Z")

</div>

I suspect keeping the data in a single index/document will be faster as there will be fewer queries and disk seeks to retrieve all the data.

---

<div class="post-metadata">

**Author:** ![makitka2007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/makitka2007/32/40768_2.png) [@makitka2007](https://discuss.elastic.co/u/makitka2007)\
**Post date:** [February 11, 2019, 9:25am UTC](https://discuss.elastic.co/t/search-over-large-documents/167768/5 "2019-02-11T09:25:43Z")

</div>

sorry for not clear explanation, for search i need only data stored in first index, i will search over it and display on search results page. then only when user clicks on some result, i will send request to second index by document id to retrieve a document will all remaining fields to display.  
will it be faster than store all fields initially in on document?

---

<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:** [March 11, 2019, 9:25am UTC](https://discuss.elastic.co/t/search-over-large-documents/167768/6 "2019-03-11T09:25:53Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
