Show / Hide Table of Contents

    Class QueryRescorer

    A Rescorer that uses a provided Query to assign scores to the first-pass hits.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    Inheritance
    System.Object
    Rescorer
    QueryRescorer
    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 QueryRescorer : Rescorer

    Constructors

    | Improve this Doc View Source

    QueryRescorer(Query)

    Sole constructor, passing the 2nd pass query to assign scores to the 1st pass hits.

    Declaration
    public QueryRescorer(Query query)
    Parameters
    Type Name Description
    Query query

    Methods

    | Improve this Doc View Source

    Combine(Single, Boolean, Single)

    Implement this in a subclass to combine the first pass and second pass scores. If secondPassMatches is false then the second pass query failed to match a hit from the first pass query, and you should ignore the secondPassScore.

    Declaration
    protected abstract float Combine(float firstPassScore, bool secondPassMatches, float secondPassScore)
    Parameters
    Type Name Description
    System.Single firstPassScore
    System.Boolean secondPassMatches
    System.Single secondPassScore
    Returns
    Type Description
    System.Single
    | Improve this Doc View Source

    Explain(IndexSearcher, Explanation, Int32)

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

    Rescore(IndexSearcher, TopDocs, Query, Double, Int32)

    Sugar API, calling Rescore(IndexSearcher, TopDocs, Int32) using a simple linear combination of firstPassScore + weight * secondPassScore

    Declaration
    public static TopDocs Rescore(IndexSearcher searcher, TopDocs topDocs, Query query, double weight, int topN)
    Parameters
    Type Name Description
    IndexSearcher searcher
    TopDocs topDocs
    Query query
    System.Double weight
    System.Int32 topN
    Returns
    Type Description
    TopDocs
    | Improve this Doc View Source

    Rescore(IndexSearcher, TopDocs, Int32)

    Declaration
    public override TopDocs Rescore(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN)
    Parameters
    Type Name Description
    IndexSearcher searcher
    TopDocs firstPassTopDocs
    System.Int32 topN
    Returns
    Type Description
    TopDocs
    Overrides
    Rescorer.Rescore(IndexSearcher, TopDocs, Int32)

    Extension Methods

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