Class QueryRescorer

java.lang.Object
org.elasticsearch.search.rescore.QueryRescorer
All Implemented Interfaces:
Rescorer

public final class QueryRescorer extends Object implements Rescorer
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Rescorer
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.lucene.search.Explanation
    explain(int topLevelDocId, org.apache.lucene.search.IndexSearcher searcher, RescoreContext rescoreContext, org.apache.lucene.search.Explanation sourceExplanation)
    Executes an Explanation phase on the rescorer.
    org.apache.lucene.search.TopDocs
    rescore(org.apache.lucene.search.TopDocs topDocs, org.apache.lucene.search.IndexSearcher searcher, RescoreContext rescoreContext)
    Modifies the result of the previously executed search (TopDocs) in place based on the given RescoreContext.

    Methods inherited from class java.lang.Object

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

    • INSTANCE

      public static final Rescorer INSTANCE
  • Constructor Details

    • QueryRescorer

      public QueryRescorer()
  • Method Details

    • rescore

      public org.apache.lucene.search.TopDocs rescore(org.apache.lucene.search.TopDocs topDocs, org.apache.lucene.search.IndexSearcher searcher, RescoreContext rescoreContext) throws IOException
      Description copied from interface: Rescorer
      Modifies the result of the previously executed search (TopDocs) in place based on the given RescoreContext.
      Specified by:
      rescore in interface Rescorer
      Parameters:
      topDocs - the result of the previously executed search
      searcher - the searcher used for this search. This will never be null.
      rescoreContext - the RescoreContext. This will never be null
      Throws:
      IOException - if an IOException occurs during rescoring
    • explain

      public org.apache.lucene.search.Explanation explain(int topLevelDocId, org.apache.lucene.search.IndexSearcher searcher, RescoreContext rescoreContext, org.apache.lucene.search.Explanation sourceExplanation) throws IOException
      Description copied from interface: Rescorer
      Executes an Explanation phase on the rescorer.
      Specified by:
      explain in interface Rescorer
      Parameters:
      topLevelDocId - the global / top-level document ID to explain
      searcher - the searcher used for this search. This will never be null.
      rescoreContext - context for this rescorer
      sourceExplanation - explanation of the source of the documents being fed into this rescore
      Returns:
      the explain for the given top level document ID.
      Throws:
      IOException - if an IOException occurs