# Elasticsearch indexing strategy for searching multiple entities

**URL:** <https://discuss.elastic.co/t/elasticsearch-indexing-strategy-for-searching-multiple-entities/267300>\
**Category:** Elasticsearch\
**Created:** [March 15, 2021, 7:25pm UTC](https://discuss.elastic.co/t/elasticsearch-indexing-strategy-for-searching-multiple-entities/267300 "2021-03-15T19:25:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pravesh\_Jain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pravesh_jain/32/78636_2.png) [@Pravesh\_Jain](https://discuss.elastic.co/u/Pravesh_Jain)\
**Post date:** [March 15, 2021, 7:25pm UTC](https://discuss.elastic.co/t/elasticsearch-indexing-strategy-for-searching-multiple-entities/267300/1 "2021-03-15T19:25:33Z")

</div>

My application deals with multiple entities, each having different fields. New entities can be added. New fields may be added in existing entities.

I want to search over all of these entities, together, using elasticsearch.

What is the recommended indexing strategy? If I index all the entities in a single index - updating the index mapping will be hard to manage.

I tried using 1 index per entity and then run search over all the entities. However, I find that the same search query takes significantly more time running over multiple indices (as compared to running over a single index) even with similar number of documents.

Is search over multiple indices expected to be slower? What is the recommended way to index when dealing with multiple entities?

---

<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:** [April 12, 2021, 7:26pm UTC](https://discuss.elastic.co/t/elasticsearch-indexing-strategy-for-searching-multiple-entities/267300/2 "2021-04-12T19:26:19Z")

</div>

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