Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class SingleDocValuesField

    Syntactic sugar for encoding floats as NumericDocValues via J2N.BitConversion.SingleToRawInt32Bits(System.Single).

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

    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
    System.Object
    Field
    NumericDocValuesField
    SingleDocValuesField
    Implements
    IIndexableField
    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(Int16)
    Field.SetInt32Value(Int32)
    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.FieldType
    Field.IndexableFieldType
    Field.GetTokenStream(Analyzer)
    Field.TranslateFieldType(Field.Store, Field.Index, Field.TermVector)
    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)
    Namespace: Lucene.Net.Documents
    Assembly: Lucene.Net.dll
    Syntax
    public class SingleDocValuesField : NumericDocValuesField, IIndexableField

    Constructors

    | Improve this Doc View Source

    SingleDocValuesField(String, Single)

    Creates a new DocValues field with the specified 32-bit System.Single value

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

    field name

    System.Single value

    32-bit System.Single value

    Exceptions
    Type Condition
    System.ArgumentNullException

    if the field name is null

    Methods

    | Improve this Doc View Source

    SetInt64Value(Int64)

    Declaration
    public override void SetInt64Value(long value)
    Parameters
    Type Name Description
    System.Int64 value
    Overrides
    Field.SetInt64Value(Int64)
    | Improve this Doc View Source

    SetSingleValue(Single)

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

    Implements

    IIndexableField

    Extension Methods

    IndexableFieldExtensions.GetByteValueOrDefault(IIndexableField)
    IndexableFieldExtensions.GetInt16ValueOrDefault(IIndexableField)
    IndexableFieldExtensions.GetInt32ValueOrDefault(IIndexableField)
    IndexableFieldExtensions.GetInt64ValueOrDefault(IIndexableField)
    IndexableFieldExtensions.GetSingleValueOrDefault(IIndexableField)
    IndexableFieldExtensions.GetDoubleValueOrDefault(IIndexableField)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 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.