Show / Hide Table of Contents

    Class Rescorer

    Re-scores the topN results (TopDocs) from an original query. See QueryRescorer for an actual implementation. Typically, you run a low-cost first-pass query across the entire index, collecting the top few hundred hits perhaps, and then use this class to mix in a more costly second pass scoring.

    See Rescore(IndexSearcher, TopDocs, Query, Double, Int32) for a simple static method to call to rescore using a 2nd pass Query.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    Inheritance
    System.Object
    Rescorer
    QueryRescorer
    SortRescorer
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Lucene.Net.Search
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class Rescorer

    Methods

    | Improve this Doc View Source

    Explain(IndexSearcher, Explanation, Int32)

    Explains how the score for the specified document was computed.

    Declaration
    public abstract Explanation Explain(IndexSearcher searcher, Explanation firstPassExplanation, int docID)
    Parameters
    Type Name Description
    IndexSearcher searcher
    Explanation firstPassExplanation
    System.Int32 docID
    Returns
    Type Description
    Explanation
    | Improve this Doc View Source

    Rescore(IndexSearcher, TopDocs, Int32)

    Rescore an initial first-pass TopDocs.

    Declaration
    public abstract TopDocs Rescore(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN)
    Parameters
    Type Name Description
    IndexSearcher searcher

    IndexSearcher used to produce the first pass topDocs

    TopDocs firstPassTopDocs

    Hits from the first pass search. It's very important that these hits were produced by the provided searcher; otherwise the doc IDs will not match!

    System.Int32 topN

    How many re-scored hits to return

    Returns
    Type Description
    TopDocs

    Extension Methods

    Number.IsNumber(Object)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2019 Licensed to the Apache Software Foundation (ASF)