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.
Inherited Members
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 |
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
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
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
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
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
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
StringField(FieldInfo, string)
Process a string field
Declaration
public override void StringField(FieldInfo fieldInfo, string value)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | fieldInfo | |
string | value |