StoredFieldVisitor

abstract class StoredFieldVisitor

Expert: provides a low-level means of accessing the stored field values in an index. See .

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 reentrant 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 .

Inheritors

Types

Link copied to clipboard

Enumeration of possible return values for .needsField.

Functions

Link copied to clipboard
open fun binaryField(fieldInfo: FieldInfo, value: ByteArray)

Process a binary field.

open fun binaryField(fieldInfo: FieldInfo, value: StoredFieldDataInput)

Expert: Process a binary field directly from the StoredFieldDataInput. Implementors of this method must read StoredFieldDataInput#length bytes from the given [ ]. The default implementation reads all bytes in a newly created byte array and calls .binaryField.

Link copied to clipboard
open fun doubleField(fieldInfo: FieldInfo, value: Double)

Process a double numeric field.

Link copied to clipboard
open fun floatField(fieldInfo: FieldInfo, value: Float)

Process a float numeric field.

Link copied to clipboard
open fun intField(fieldInfo: FieldInfo, value: Int)

Process an int numeric field.

Link copied to clipboard
open fun longField(fieldInfo: FieldInfo, value: Long)

Process a long numeric field.

Link copied to clipboard

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

Link copied to clipboard
open fun stringField(fieldInfo: FieldInfo, value: String)

Process a string field.