java.lang.Object
org.elasticsearch.search.rank.RankCoordinatorContext
RankContext
is a base class used to generate ranking
results on the coordinator and then set the rank for any
search hits that are found.-
Field Summary
Modifier and TypeFieldDescriptionprotected final int
protected final int
protected final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract SearchPhaseController.SortedTopDocs
rank
(List<QuerySearchResult> querySearchResults, SearchPhaseController.TopDocsStats topDocStats) This is used to pull information passed back from the shards as part ofQuerySearchResult.getRankShardResult()
and return aSearchPhaseController.SortedTopDocs
of the final rank results.
-
Field Details
-
size
protected final int size -
from
protected final int from -
windowSize
protected final int windowSize
-
-
Constructor Details
-
RankCoordinatorContext
public RankCoordinatorContext(int size, int from, int windowSize)
-
-
Method Details
-
rank
public abstract SearchPhaseController.SortedTopDocs rank(List<QuerySearchResult> querySearchResults, SearchPhaseController.TopDocsStats topDocStats) This is used to pull information passed back from the shards as part ofQuerySearchResult.getRankShardResult()
and return aSearchPhaseController.SortedTopDocs
of the final rank results. Note thatSearchPhaseController.TopDocsStats
is included so that appropriate stats may be updated based on rank results. This is called at the end of the query phase prior to the fetch phase.
-