Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class DocumentStoredFieldVisitor

    A StoredFieldVisitor that creates a Document containing all stored fields, or only specific requested fields provided to DocumentStoredFieldVisitor(ISet<string>).

    This is used by Document(int) to load a document.

    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.Documents
    Assembly: Lucene.Net.dll
    Syntax
    public class DocumentStoredFieldVisitor : StoredFieldVisitor

    Constructors

    DocumentStoredFieldVisitor()

    Load all stored fields.

    Declaration
    public DocumentStoredFieldVisitor()

    DocumentStoredFieldVisitor(ISet<string>)

    Load only fields named in the provided ISet<T>.

    Declaration
    public DocumentStoredFieldVisitor(ISet<string> fieldsToAdd)
    Parameters
    Type Name Description
    ISet<string> fieldsToAdd

    Set of fields to load, or null (all fields).

    DocumentStoredFieldVisitor(params string[])

    Load only fields named in the provided fields.

    Declaration
    public DocumentStoredFieldVisitor(params string[] fields)
    Parameters
    Type Name Description
    string[] fields

    Properties

    Document

    Retrieve the visited document.

    Declaration
    public virtual Document Document { get; }
    Property Value
    Type Description
    Document

    Document populated with stored fields. Note that only the stored information in the field instances is valid, data such as boosts, indexing options, term vector options, etc is not set.

    Methods

    BinaryField(FieldInfo, byte[])

    Process a binary field.

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

    newly allocated byte array with the binary contents.

    Overrides
    StoredFieldVisitor.BinaryField(FieldInfo, byte[])

    DoubleField(FieldInfo, double)

    Process a double numeric field.

    Declaration
    public override void DoubleField(FieldInfo fieldInfo, double value)
    Parameters
    Type Name Description
    FieldInfo fieldInfo
    double value
    Overrides
    StoredFieldVisitor.DoubleField(FieldInfo, double)

    Int32Field(FieldInfo, int)

    Process a int numeric field.

    Declaration
    public override void Int32Field(FieldInfo fieldInfo, int value)
    Parameters
    Type Name Description
    FieldInfo fieldInfo
    int value
    Overrides
    StoredFieldVisitor.Int32Field(FieldInfo, int)

    Int64Field(FieldInfo, long)

    Process a long numeric field.

    Declaration
    public override void Int64Field(FieldInfo fieldInfo, long value)
    Parameters
    Type Name Description
    FieldInfo fieldInfo
    long value
    Overrides
    StoredFieldVisitor.Int64Field(FieldInfo, long)

    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 override StoredFieldVisitor.Status NeedsField(FieldInfo fieldInfo)
    Parameters
    Type Name Description
    FieldInfo fieldInfo
    Returns
    Type Description
    StoredFieldVisitor.Status
    Overrides
    StoredFieldVisitor.NeedsField(FieldInfo)

    SingleField(FieldInfo, float)

    Process a float numeric field.

    Declaration
    public override void SingleField(FieldInfo fieldInfo, float value)
    Parameters
    Type Name Description
    FieldInfo fieldInfo
    float value
    Overrides
    StoredFieldVisitor.SingleField(FieldInfo, float)

    StringField(FieldInfo, string)

    Process a string field

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