Interface Rescorer

  • All Known Implementing Classes:
    QueryRescorer

    public interface Rescorer
    A query rescorer interface used to re-rank the Top-K results of a previously executed search. Subclasses should borrow heavily from QueryRescorer because it is fairly well behaved and documents that tradeoffs that it is making. There is also an ExampleRescorer that is worth looking at.
    • Method Detail

      • explain

        Explanation explain​(int topLevelDocId,
                            IndexSearcher searcher,
                            RescoreContext rescoreContext,
                            Explanation sourceExplanation)
                     throws IOException
        Executes an Explanation phase on the 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