Retrieve top ranked documents in Elastic Search

204 views Asked by At

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?

1

There are 1 answers

0
Alkis Kalogeris On BEST ANSWER

You can use the multisearch api in order to do completely separate queries in one go.