Class StoredFieldVisitor
Expert: Provides a low-level means of accessing the stored field values in an index. See Document(Int32, 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(Int32).
Note
This API is experimental and might change in incompatible ways in the next release.
Inherited Members
Namespace: Lucene.Net.Index
Assembly: Lucene.Net.dll
Syntax
public abstract class StoredFieldVisitor
Constructors
| Improve this Doc View SourceStoredFieldVisitor()
Sole constructor. (For invocation by subclass constructors, typically implicit.)
Declaration
protected StoredFieldVisitor()
Methods
| Improve this Doc View SourceBinaryField(FieldInfo, Byte[])
Process a binary field.
Declaration
public virtual void BinaryField(FieldInfo fieldInfo, byte[] value)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | fieldInfo | |
System.Byte[] | value | newly allocated byte array with the binary contents. |
DoubleField(FieldInfo, Double)
Process a System.Double numeric field.
Declaration
public virtual void DoubleField(FieldInfo fieldInfo, double value)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | fieldInfo | |
System.Double | value |
Int32Field(FieldInfo, Int32)
Process a System.Int32 numeric field.
Declaration
public virtual void Int32Field(FieldInfo fieldInfo, int value)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | fieldInfo | |
System.Int32 | value |
Int64Field(FieldInfo, Int64)
Process a System.Int64 numeric field.
Declaration
public virtual void Int64Field(FieldInfo fieldInfo, long value)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | fieldInfo | |
System.Int64 | 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, Single)
Process a System.Single numeric field.
Declaration
public virtual void SingleField(FieldInfo fieldInfo, float value)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | fieldInfo | |
System.Single | value |
StringField(FieldInfo, String)
Process a System.String field
Declaration
public virtual void StringField(FieldInfo fieldInfo, string value)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | fieldInfo | |
System.String | value |