We have two type of documents and they are packages & recipients. We want to search across both of these types at the same time. We can accomplice this goal via POST to index_name/packages,recipients/_search URL.
Is there any flag which we can use to tell elasticsearch that first search on recipients and then on packages ? Suppose there are 1K packages and 100recipients. When search it searches across both types but fetches only packages if we do the sorting via id DESC. If we do the sorting id ASC then it fetches recipients too since they are created earlier.
```
{
"query": {
"query_string": {
"query": "*james* *s*",
"fields": [
"_all",
"packages.recipientId.email"
],
"default_operator": "AND"
}
},
"size": "10",
"from": "0",
"sort": {
"id": {
"order": "desc"
}
}
}
```
Any help will be much appreciated.