How to get latest document in multiple indices

We have several document types across several indices (each type in its own index).
We are querying all indices which works great.
However, we want to be able to do top_hits and to get the latest document but from specific type, not the latest in the whole query.
How can that be achieved?

Many thanks

Hey,

have you thought about using a multi search to get a single result for each index or are you index specified somewhat dynamic?

--Alex

it is not a matter of multiple queries- I can do it manually as well. I want to get it in one query. My index is {type}-yyyy-mm-dd

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