Class StoredField
A field whose value is stored so that Doc(Int32) and Document(Int32) will return the field and its value.
Implements
Inherited Members
Namespace: Lucene.Net.Documents
Assembly: Lucene.Net.dll
Syntax
public sealed class StoredField : Field, IIndexableField
Constructors
| Improve this Doc View SourceStoredField(String, BytesRef)
Create a stored-only field with the given binary value.
NOTE: the provided BytesRef is not copied so be sure not to change it until you're done with this field.
Declaration
public StoredField(string name, BytesRef value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | field name |
BytesRef | value | BytesRef pointing to binary content (not copied) |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | if the field |
StoredField(String, Byte[])
Create a stored-only field with the given binary value.
NOTE: the provided byte[] is not copied so be sure not to change it until you're done with this field.
Declaration
public StoredField(string name, byte[] value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | field name |
System.Byte[] | value | byte array pointing to binary content (not copied) |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | if the field |
StoredField(String, Byte[], Int32, Int32)
Create a stored-only field with the given binary value.
NOTE: the provided byte[] is not copied so be sure not to change it until you're done with this field.
Declaration
public StoredField(string name, byte[] value, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | field name |
System.Byte[] | value | System.Byte array pointing to binary content (not copied) |
System.Int32 | offset | starting position of the byte array |
System.Int32 | length | valid length of the byte array |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | if the field |
StoredField(String, Double)
Create a stored-only field with the given System.Double value.
Declaration
public StoredField(string name, double value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | field name |
System.Double | value | System.Double value |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | if the field |
StoredField(String, Int32)
Create a stored-only field with the given System.Int32 value.
Declaration
public StoredField(string name, int value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | field name |
System.Int32 | value | System.Int32 value |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | if the field |
StoredField(String, Int64)
Create a stored-only field with the given System.Int64 value.
Declaration
public StoredField(string name, long value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | field name |
System.Int64 | value | System.Int64 value |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | if the field |
StoredField(String, Single)
Create a stored-only field with the given System.Single value.
Declaration
public StoredField(string name, float value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | field name |
System.Single | value | System.Single value |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | if the field |
StoredField(String, String)
Create a stored-only field with the given System.String value.
Declaration
public StoredField(string name, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | field name |
System.String | value | System.String value |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | if the field |
Fields
| Improve this Doc View SourceTYPE
Type for a stored-only field.
Declaration
public static readonly FieldType TYPE
Field Value
Type | Description |
---|---|
FieldType |