Package org.elasticsearch.search.rescore
Class RescoreContext
- java.lang.Object
-
- org.elasticsearch.search.rescore.RescoreContext
-
- Direct Known Subclasses:
QueryRescorer.QueryRescoreContext
public class RescoreContext extends java.lang.ObjectContext available to the rescore while it is running. Rescore implementations should extend this with any additional resources that they will need while rescoring.
-
-
Constructor Summary
Constructors Constructor Description RescoreContext(int windowSize, Rescorer rescorer)Build the context.
-
Method Summary
Modifier and Type Method Description intgetWindowSize()Size of the window to rescore.booleanisRescored(int docId)Rescorerrescorer()The rescorer to actually apply.voidsetRescoredDocs(java.util.Set<java.lang.Integer> docIds)
-
-
-
Constructor Detail
-
RescoreContext
public RescoreContext(int windowSize, Rescorer rescorer)Build the context.- Parameters:
rescorer- the rescorer actually performing the rescore.
-
-
Method Detail
-
rescorer
public Rescorer rescorer()
The rescorer to actually apply.
-
getWindowSize
public int getWindowSize()
Size of the window to rescore.
-
setRescoredDocs
public void setRescoredDocs(java.util.Set<java.lang.Integer> docIds)
-
isRescored
public boolean isRescored(int docId)
-
-