Show / Hide Table of Contents

    Class ScaleSingleFunction

    Scales values to be between min and max.

    This implementation currently traverses all of the source values to obtain their min and max.

    This implementation currently cannot distinguish when documents have been deleted or documents that have no value, and 0.0 values will be used for these cases. This means that if values are normally all greater than 0.0, one can still end up with 0.0 as the min value to map from. In these cases, an appropriate map() function could be used as a workaround to change 0.0 to a value in the real range.

    NOTE: This was ScaleFloatFunction in Lucene

    Inheritance
    System.Object
    ValueSource
    ScaleSingleFunction
    Inherited Members
    ValueSource.ToString()
    ValueSource.NewContext(IndexSearcher)
    ValueSource.GetSortField(Boolean)
    Namespace: Lucene.Net.Queries.Function.ValueSources
    Assembly: Lucene.Net.Queries.dll
    Syntax
    public class ScaleSingleFunction : ValueSource

    Constructors

    | Improve this Doc View Source

    ScaleSingleFunction(ValueSource, Single, Single)

    Declaration
    public ScaleSingleFunction(ValueSource source, float min, float max)
    Parameters
    Type Name Description
    ValueSource source
    System.Single min
    System.Single max

    Fields

    | Improve this Doc View Source

    m_max

    Declaration
    protected readonly float m_max
    Field Value
    Type Description
    System.Single
    | Improve this Doc View Source

    m_min

    Declaration
    protected readonly float m_min
    Field Value
    Type Description
    System.Single
    | Improve this Doc View Source

    m_source

    Declaration
    protected readonly ValueSource m_source
    Field Value
    Type Description
    ValueSource

    Methods

    | Improve this Doc View Source

    CreateWeight(IDictionary, IndexSearcher)

    Declaration
    public override void CreateWeight(IDictionary context, IndexSearcher searcher)
    Parameters
    Type Name Description
    IDictionary context
    IndexSearcher searcher
    Overrides
    ValueSource.CreateWeight(IDictionary, IndexSearcher)
    | Improve this Doc View Source

    Equals(Object)

    Declaration
    public override bool Equals(object o)
    Parameters
    Type Name Description
    System.Object o
    Returns
    Type Description
    System.Boolean
    Overrides
    ValueSource.Equals(Object)
    | Improve this Doc View Source

    GetDescription()

    Declaration
    public override string GetDescription()
    Returns
    Type Description
    System.String
    Overrides
    ValueSource.GetDescription()
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    ValueSource.GetHashCode()
    | Improve this Doc View Source

    GetValues(IDictionary, AtomicReaderContext)

    Declaration
    public override FunctionValues GetValues(IDictionary context, AtomicReaderContext readerContext)
    Parameters
    Type Name Description
    IDictionary context
    AtomicReaderContext readerContext
    Returns
    Type Description
    FunctionValues
    Overrides
    ValueSource.GetValues(IDictionary, AtomicReaderContext)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)