Assume that I have a single index with documents that have two computed fields for ranking: popularity
and relevance
. Also assume that there is no overlap between documents that should be ranked by popularity
and that should be ranked byrelevance
. That is, in the system some documents should be ranked by popularity
and others by relevance
.
Then I need to retrieve N
top ranked documents with the requirement that N1
of them are ranked by popularity
and N-N1
are ranked by relevance
.
Is there a way to do this in Elastic Search with a single request?
You can use the multisearch api in order to do completely separate queries in one go.