my data model is centered around a concept that shapes the indices names (for easier filtering on this concept). I have 3 types of indices per concept : start, wip, end. So indices look like that:
end-concept-a and same goes for
concept-b and so on.
Now there is one additionnal thing. A document ID is always unique across all indices of the same type (I cannot have
id1 tied to
concept-b). This is implemented on the layer above elasticsearch itself (a java api that adds a bit of business logic and simplifies calls to elasticsearch for the end user).
One last important thing, there is a lookup indice to match every document ID against a concept.
Now that I tried to explain my data model, here comes the question:
What is the most efficient between these 2 ways of getting a list of items by ID stored under the same type of indice (say, indices starting with
- For each ID in the list, check on what indice it is stored using a GET by ID on the lookup indice, then fetch the document on the proper indice (say,
- make a GET request on
I hope I was clear enough, if not, I would be glad to try and explain more clearly.