java.lang.Object
org.elasticsearch.search.rank.RankShardContext
RankShardContext
is a base class used to generate ranking
results on each shard where it's responsible for executing any
queries during the query phase required for its global ranking method.-
Field Summary
Modifier and TypeFieldDescriptionprotected final int
protected final List<org.apache.lucene.search.Query>
protected final int
-
Constructor Summary
ConstructorDescriptionRankShardContext
(List<org.apache.lucene.search.Query> queries, int from, int windowSize) -
Method Summary
Modifier and TypeMethodDescriptionabstract RankShardResult
This is used to reduce the number of required results that are serialized to the coordinating node.List<org.apache.lucene.search.Query>
queries()
int
-
Field Details
-
queries
-
from
protected final int from -
windowSize
protected final int windowSize
-
-
Constructor Details
-
RankShardContext
-
-
Method Details
-
queries
-
windowSize
public int windowSize() -
combine
This is used to reduce the number of required results that are serialized to the coordinating node. Normally we would have to serialize(queries + knns)*window_size
results, but we can infer that there will likely be overlap of document results. Given that we know any searches that match the same document must be on the same shard, we can sort on the shard instead for a top window_size set of results and reduce the amount of data we serialize.
-