Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class ValueSource

    Instantiates FunctionValues for a particular reader.

    Often used when creating a FunctionQuery.
    Inheritance
    object
    ValueSource
    BoolFunction
    ConstNumberSource
    DocFreqValueSource
    DualSingleFunction
    FieldCacheSource
    LinearSingleFunction
    LiteralValueSource
    MaxDocValueSource
    MultiFunction
    MultiSingleFunction
    MultiValueSource
    NormValueSource
    NumDocsValueSource
    OrdFieldSource
    QueryValueSource
    RangeMapSingleFunction
    ReciprocalSingleFunction
    ReverseOrdFieldSource
    ScaleSingleFunction
    SingularFunction
    SumTotalTermFreqValueSource
    TotalTermFreqValueSource
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Lucene.Net.Queries.Function
    Assembly: Lucene.Net.Queries.dll
    Syntax
    public abstract class ValueSource

    Methods

    CreateWeight(IDictionary, IndexSearcher)

    Implementations should propagate CreateWeight to sub-ValueSources which can optionally store weight info in the context. The context object will be passed to GetValues() where this info can be retrieved.

    Declaration
    public virtual void CreateWeight(IDictionary context, IndexSearcher searcher)
    Parameters
    Type Name Description
    IDictionary context
    IndexSearcher searcher

    Equals(object)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override abstract bool Equals(object o)
    Parameters
    Type Name Description
    object o
    Returns
    Type Description
    bool

    true if the specified object is equal to the current object; otherwise, false.

    Overrides
    object.Equals(object)

    GetDescription()

    description of field, used in Explain()

    Declaration
    public abstract string GetDescription()
    Returns
    Type Description
    string

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override abstract int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    Overrides
    object.GetHashCode()

    GetSortField(bool)

    EXPERIMENTAL: This method is subject to change.

    Get the Lucene.Net.Search.SortField for this ValueSource. Uses the GetValues(IDictionary, AtomicReaderContext) to populate the Lucene.Net.Search.SortField.
    Declaration
    public virtual SortField GetSortField(bool reverse)
    Parameters
    Type Name Description
    bool reverse

    true if this is a reverse sort.

    Returns
    Type Description
    SortField

    The Lucene.Net.Search.SortField for the ValueSource

    GetValues(IDictionary, AtomicReaderContext)

    Gets the values for this reader and the context that was previously passed to CreateWeight(IDictionary, IndexSearcher)

    Declaration
    public abstract FunctionValues GetValues(IDictionary context, AtomicReaderContext readerContext)
    Parameters
    Type Name Description
    IDictionary context
    AtomicReaderContext readerContext
    Returns
    Type Description
    FunctionValues

    NewContext(IndexSearcher)

    Returns a new non-threadsafe context map.

    Declaration
    public static IDictionary NewContext(IndexSearcher searcher)
    Parameters
    Type Name Description
    IndexSearcher searcher
    Returns
    Type Description
    IDictionary

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

    Overrides
    object.ToString()
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.