Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class StoredField

    A field whose value is stored so that Doc(int) and Document(int) will return the field and its value.

    Inheritance
    object
    Field
    StoredField
    Implements
    IIndexableField
    IFormattable
    Inherited Members
    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.SetInt64Value(long)
    Field.SetSingleValue(float)
    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.ReferenceEquals(object, object)
    Namespace: Lucene.Net.Documents
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class StoredField : Field, IIndexableField, IFormattable

    Constructors

    StoredField(string, BytesRef)

    Create a stored-only field with the given binary value.

    NOTE: the provided BytesRef is not copied so be sure not to change it until you're done with this field.

    Declaration
    public StoredField(string name, BytesRef value)
    Parameters
    Type Name Description
    string name

    field name

    BytesRef value

    BytesRef pointing to binary content (not copied)

    Exceptions
    Type Condition
    ArgumentNullException

    if the field name is null.

    StoredField(string, byte[])

    Create a stored-only field with the given binary value.

    NOTE: the provided byte[] is not copied so be sure not to change it until you're done with this field.

    Declaration
    public StoredField(string name, byte[] value)
    Parameters
    Type Name Description
    string name

    field name

    byte[] value

    byte array pointing to binary content (not copied)

    Exceptions
    Type Condition
    ArgumentNullException

    if the field name is null.

    StoredField(string, byte[], int, int)

    Create a stored-only field with the given binary value.

    NOTE: the provided byte[] is not copied so be sure not to change it until you're done with this field.

    Declaration
    public StoredField(string name, byte[] value, int offset, int length)
    Parameters
    Type Name Description
    string name

    field name

    byte[] value

    byte array pointing to binary content (not copied)

    int offset

    starting position of the byte array

    int length

    valid length of the byte array

    Exceptions
    Type Condition
    ArgumentNullException

    if the field name is null.

    StoredField(string, double)

    Create a stored-only field with the given double value.

    Declaration
    public StoredField(string name, double value)
    Parameters
    Type Name Description
    string name

    field name

    double value

    double value

    Exceptions
    Type Condition
    ArgumentNullException

    if the field name is null.

    StoredField(string, int)

    Create a stored-only field with the given int value.

    Declaration
    public StoredField(string name, int value)
    Parameters
    Type Name Description
    string name

    field name

    int value

    int value

    Exceptions
    Type Condition
    ArgumentNullException

    if the field name is null.

    StoredField(string, long)

    Create a stored-only field with the given long value.

    Declaration
    public StoredField(string name, long value)
    Parameters
    Type Name Description
    string name

    field name

    long value

    long value

    Exceptions
    Type Condition
    ArgumentNullException

    if the field name is null.

    StoredField(string, float)

    Create a stored-only field with the given float value.

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

    field name

    float value

    float value

    Exceptions
    Type Condition
    ArgumentNullException

    if the field name is null.

    StoredField(string, string)

    Create a stored-only field with the given string value.

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

    field name

    string value

    string value

    Exceptions
    Type Condition
    ArgumentNullException

    if the field name or value is null.

    Fields

    TYPE

    Type for a stored-only field.

    Declaration
    public static readonly FieldType TYPE
    Field Value
    Type Description
    FieldType

    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.