Class RescoreContext

  • Direct Known Subclasses:
    QueryRescorer.QueryRescoreContext

    public class RescoreContext
    extends 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 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​(Set<Integer> docIds)
      • isRescored

        public boolean isRescored​(int docId)
      • getQueries

        public List<Query> getQueries()
        Returns queries associated with the rescorer