Is it possible to get fixed number of results from each index searched? For example if it1
, it2
and it3
are three different indexes and I want 6 results from it1
, 4 results from it2
and 5 from it3
. And I want only these 15 results to be send back to requested source in JSON object document.
I'm using multi search API with context suggester as:
GET _msearch
{"index":"it1","type":"_doc"}
{"suggest":{"suggestion":{"prefix":"ekt","completion":{"field":"suggest","fuzzy":{"fuzziness":2}}}}}
{"index":"it2","type":"_doc"}
{"suggest":{"suggestion":{"prefix":"ekt","completion":{"field":"suggest","fuzzy":{"fuzziness":2}}}}}
{"index":"it3","type":"_doc"}
{"suggest":{"suggestion":{"prefix":"ekt","completion":{"field":"suggest","fuzzy":{"fuzziness":2}}}}}