Elasticsearch indexing strategy for searching multiple entities

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?

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