I have two different indices(index-1, index-2) in a cluster with the same schema. I know I can query the two indices together in a single query, so if I set in the query "size":1000 elastic search will return 1000 results from each of the indices, sort the 2000 results according to the "_score" and return back the top 1000 documents.
However I am curious to know if there is a way to force elastic search to pick only maybe 10 documents from index-1 and the rest of the 990 documents from index-2? I am using ElasticSearch 7.1
This is the query I am using.
GET /index-1,index-2/_search/
{
"query": {
"multi_match": {
"query": "My query",
"fields": [
"field_1",
"field_2"
]
}
},
"size": 1000
}