# Recommendation for Multiple index vs single index for small amounts of query

**URL:** <https://discuss.elastic.co/t/recommendation-for-multiple-index-vs-single-index-for-small-amounts-of-query/233661>\
**Category:** Elasticsearch\
**Created:** [May 21, 2020, 4:31am UTC](https://discuss.elastic.co/t/recommendation-for-multiple-index-vs-single-index-for-small-amounts-of-query/233661 "2020-05-21T04:31:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![yui98jaesok](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@yui98jaesok](https://discuss.elastic.co/u/yui98jaesok)\
**Post date:** [May 21, 2020, 4:31am UTC](https://discuss.elastic.co/t/recommendation-for-multiple-index-vs-single-index-for-small-amounts-of-query/233661/1 "2020-05-21T04:31:47Z")

</div>

Hello everyone,

I have read a lot on the forums for pros and cons of multiple indexs vs single index and I want to get some advice for my specific use case. I have a pipeline that ingests word documents from clients, and afterwards runs a query against it. The query and the documents do not change so in normal circumstances only one query is executed and the results are expected to be the same. Is it better for me to have

1. single index for multiple customers and all of their documents
2. single index for each customer and all of their documents
3. single index for each customer and single index for a set of documents (for one query)
4. single index for every set of documents but dropped after query is completed

Thank you for your advice.

---

<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:** [May 21, 2020, 4:47am UTC](https://discuss.elastic.co/t/recommendation-for-multiple-index-vs-single-index-for-small-amounts-of-query/233661/2 "2020-05-21T04:47:53Z")

</div>

Welcome! 😃

The answer is It Depends. Do you do specific retention periods for different customers? Or do you want to be able to do billing based on resource use (eg disk)? Do you have security and privacy requirements for some customers?

If so, then splitting by customer might make a lot of sense.

---

<div class="post-metadata">

**Author:** ![yui98jaesok](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@yui98jaesok](https://discuss.elastic.co/u/yui98jaesok)\
**Post date:** [May 21, 2020, 5:14am UTC](https://discuss.elastic.co/t/recommendation-for-multiple-index-vs-single-index-for-small-amounts-of-query/233661/3 "2020-05-21T05:14:31Z")

</div>

Thanks for sharing. So here's my thought process:

1. Customer uploads documents and I index them
2. After index, I run a query against the documents
3. Since I don't need to rerun a query, I save the query results in another nosql database like mongo
4. I drop the one-time use index
5. In future, I retrieve the search results from mongo

Is this an efficient way to handle such "one time use" indexes?

---

<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:** [May 21, 2020, 6:47am UTC](https://discuss.elastic.co/t/recommendation-for-multiple-index-vs-single-index-for-small-amounts-of-query/233661/4 "2020-05-21T06:47:05Z")

</div>

Elasticsearch isn't really designed for this sort of use case, it'll work though.

---

<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:** [May 21, 2020, 6:51am UTC](https://discuss.elastic.co/t/recommendation-for-multiple-index-vs-single-index-for-small-amounts-of-query/233661/5 "2020-05-21T06:51:18Z")

</div>

What is it you are trying to achieve here? What is the use case? Why use Elasticsearch at all?

---

<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:** [June 18, 2020, 6:51am UTC](https://discuss.elastic.co/t/recommendation-for-multiple-index-vs-single-index-for-small-amounts-of-query/233661/6 "2020-06-18T06:51:23Z")

</div>

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