Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class SingleDocValuesField

    Syntactic sugar for encoding floats as NumericDocValues via SingleToRawInt32Bits(float).

    Per-document floating point values can be retrieved via GetSingles(AtomicReader, string, bool).

    NOTE: In most all cases this will be rather inefficient, requiring four bytes per document. Consider encoding floating point values yourself with only as much precision as you require.

    NOTE: This was FloatDocValuesField in Lucene

    Inheritance
    object
    Field
    NumericDocValuesField
    SingleDocValuesField
    Implements
    IIndexableField
    IFormattable
    Inherited Members
    NumericDocValuesField.TYPE
    Field.m_type
    Field.m_name
    Field.FieldsData
    Field.m_tokenStream
    Field.m_boost
    Field.GetStringValue()
    Field.GetStringValue(IFormatProvider)
    Field.GetStringValue(string)
    Field.GetStringValue(string, IFormatProvider)
    Field.GetReaderValue()
    Field.GetTokenStreamValue()
    Field.SetStringValue(string)
    Field.SetReaderValue(TextReader)
    Field.SetBytesValue(BytesRef)
    Field.SetBytesValue(byte[])
    Field.SetByteValue(byte)
    Field.SetInt16Value(short)
    Field.SetInt32Value(int)
    Field.SetDoubleValue(double)
    Field.SetTokenStream(TokenStream)
    Field.Name
    Field.Boost
    Field.GetNumericValue()
    Field.NumericType
    Field.GetByteValue()
    Field.GetInt16Value()
    Field.GetInt32Value()
    Field.GetInt64Value()
    Field.GetSingleValue()
    Field.GetDoubleValue()
    Field.GetBinaryValue()
    Field.ToString()
    Field.ToString(string)
    Field.ToString(IFormatProvider)
    Field.ToString(string, IFormatProvider)
    Field.FieldType
    Field.IndexableFieldType
    Field.GetTokenStream(Analyzer)
    Field.TranslateFieldType(Field.Store, Field.Index, Field.TermVector)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Lucene.Net.Documents
    Assembly: Lucene.Net.dll
    Syntax
    public class SingleDocValuesField : NumericDocValuesField, IIndexableField, IFormattable

    Constructors

    SingleDocValuesField(string, float)

    Creates a new DocValues field with the specified 32-bit float value

    Declaration
    public SingleDocValuesField(string name, float value)
    Parameters
    Type Name Description
    string name

    field name

    float value

    32-bit float value

    Exceptions
    Type Condition
    ArgumentNullException

    if the field name is null

    Methods

    SetInt64Value(long)

    Expert: change the value of this field. See SetStringValue(string).

    Declaration
    public override void SetInt64Value(long value)
    Parameters
    Type Name Description
    long value
    Overrides
    Field.SetInt64Value(long)

    SetSingleValue(float)

    Expert: change the value of this field. See SetStringValue(string).

    Declaration
    public override void SetSingleValue(float value)
    Parameters
    Type Name Description
    float value
    Overrides
    Field.SetSingleValue(float)

    Implements

    IIndexableField
    IFormattable

    Extension Methods

    IndexableFieldExtensions.GetByteValueOrDefault(IIndexableField)
    IndexableFieldExtensions.GetDoubleValueOrDefault(IIndexableField)
    IndexableFieldExtensions.GetInt16ValueOrDefault(IIndexableField)
    IndexableFieldExtensions.GetInt32ValueOrDefault(IIndexableField)
    IndexableFieldExtensions.GetInt64ValueOrDefault(IIndexableField)
    IndexableFieldExtensions.GetSingleValueOrDefault(IIndexableField)
    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.