Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class StoredFieldVisitor

    Expert: Provides a low-level means of accessing the stored field values in an index. See Document(int, StoredFieldVisitor).

    NOTE: a StoredFieldVisitor implementation should not try to load or visit other stored documents in the same reader because the implementation of stored fields for most codecs is not reeentrant and you will see strange exceptions as a result.

    See DocumentStoredFieldVisitor, which is a StoredFieldVisitor that builds the Document containing all stored fields. This is used by Document(int).

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Inheritance
    object
    StoredFieldVisitor
    DocumentStoredFieldVisitor
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Index
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class StoredFieldVisitor

    Constructors

    StoredFieldVisitor()

    Sole constructor. (For invocation by subclass constructors, typically implicit.)

    Declaration
    protected StoredFieldVisitor()

    Methods

    BinaryField(FieldInfo, byte[])

    Process a binary field.

    Declaration
    public virtual void BinaryField(FieldInfo fieldInfo, byte[] value)
    Parameters
    Type Name Description
    FieldInfo fieldInfo
    byte[] value

    newly allocated byte array with the binary contents.

    DoubleField(FieldInfo, double)

    Process a double numeric field.

    Declaration
    public virtual void DoubleField(FieldInfo fieldInfo, double value)
    Parameters
    Type Name Description
    FieldInfo fieldInfo
    double value

    Int32Field(FieldInfo, int)

    Process a int numeric field.

    Declaration
    public virtual void Int32Field(FieldInfo fieldInfo, int value)
    Parameters
    Type Name Description
    FieldInfo fieldInfo
    int value

    Int64Field(FieldInfo, long)

    Process a long numeric field.

    Declaration
    public virtual void Int64Field(FieldInfo fieldInfo, long value)
    Parameters
    Type Name Description
    FieldInfo fieldInfo
    long value

    NeedsField(FieldInfo)

    Hook before processing a field. Before a field is processed, this method is invoked so that subclasses can return a StoredFieldVisitor.Status representing whether they need that particular field or not, or to stop processing entirely.

    Declaration
    public abstract StoredFieldVisitor.Status NeedsField(FieldInfo fieldInfo)
    Parameters
    Type Name Description
    FieldInfo fieldInfo
    Returns
    Type Description
    StoredFieldVisitor.Status

    SingleField(FieldInfo, float)

    Process a float numeric field.

    Declaration
    public virtual void SingleField(FieldInfo fieldInfo, float value)
    Parameters
    Type Name Description
    FieldInfo fieldInfo
    float value

    StringField(FieldInfo, string)

    Process a string field

    Declaration
    public virtual void StringField(FieldInfo fieldInfo, string value)
    Parameters
    Type Name Description
    FieldInfo fieldInfo
    string value
    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.