Class RescoreContext

Direct Known Subclasses:

public class RescoreContext
extends java.lang.Object
Context 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

    Constructor Description
    RescoreContext​(int windowSize, Rescorer rescorer)
    Build the context.
  • Method Summary

    Modifier and Type Method Description
    java.util.List<> getQueries()
    Returns queries associated with the rescorer
    int getWindowSize()
    Size of the window to rescore.
    boolean isRescored​(int docId)  
    Rescorer rescorer()
    The rescorer to actually apply.
    void setRescoredDocs​(java.util.Set<java.lang.Integer> docIds)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RescoreContext

      public RescoreContext​(int windowSize, Rescorer rescorer)
      Build the context.
      rescorer - the rescorer actually performing the rescore.
  • Method Details

    • 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)
    • getQueries

      public java.util.List<> getQueries()
      Returns queries associated with the rescorer