Method AddStoredField
AddStoredField(Document, String, Byte[])
Adds 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 static StoredField AddStoredField(this Document document, string name, byte[] value)
Parameters
Type | Name | Description |
---|---|---|
Document | document | This Document. |
System.String | name | field name |
System.Byte[] | value | byte array pointing to binary content (not copied) |
Returns
Type | Description |
---|---|
StoredField | The field that was added to this Document. |
AddStoredField(Document, String, Byte[], Int32, Int32)
Adds 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 static StoredField AddStoredField(this Document document, string name, byte[] value, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
Document | document | This Document. |
System.String | name | field name |
System.Byte[] | value | |
System.Int32 | offset | starting position of the byte array |
System.Int32 | length | valid length of the byte array |
Returns
Type | Description |
---|---|
StoredField | The field that was added to this Document. |
AddStoredField(Document, String, BytesRef)
Adds 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 static StoredField AddStoredField(this Document document, string name, BytesRef value)
Parameters
Type | Name | Description |
---|---|---|
Document | document | This Document. |
System.String | name | field name |
BytesRef | value | BytesRef pointing to binary content (not copied) |
Returns
Type | Description |
---|---|
StoredField | The field that was added to this Document. |
AddStoredField(Document, String, String)
Adds a stored-only field with the given
Declaration
public static StoredField AddStoredField(this Document document, string name, string value)
Parameters
Type | Name | Description |
---|---|---|
Document | document | This Document. |
System.String | name | field name |
System.String | value |
Returns
Type | Description |
---|---|
StoredField | The field that was added to this Document. |
AddStoredField(Document, String, Int32)
Adds a stored-only field with the given
Declaration
public static StoredField AddStoredField(this Document document, string name, int value)
Parameters
Type | Name | Description |
---|---|---|
Document | document | This Document. |
System.String | name | field name |
System.Int32 | value |
Returns
Type | Description |
---|---|
StoredField | The field that was added to this Document. |
AddStoredField(Document, String, Single)
Adds a stored-only field with the given
Declaration
public static StoredField AddStoredField(this Document document, string name, float value)
Parameters
Type | Name | Description |
---|---|---|
Document | document | This Document. |
System.String | name | field name |
System.Single | value |
Returns
Type | Description |
---|---|
StoredField | The field that was added to this Document. |
AddStoredField(Document, String, Int64)
Adds a stored-only field with the given
Declaration
public static StoredField AddStoredField(this Document document, string name, long value)
Parameters
Type | Name | Description |
---|---|---|
Document | document | This Document. |
System.String | name | field name |
System.Int64 | value |
Returns
Type | Description |
---|---|
StoredField | The field that was added to this Document. |
AddStoredField(Document, String, Double)
Adds a stored-only field with the given
Declaration
public static StoredField AddStoredField(this Document document, string name, double value)
Parameters
Type | Name | Description |
---|---|---|
Document | document | This Document. |
System.String | name | field name |
System.Double | value |
Returns
Type | Description |
---|---|
StoredField | The field that was added to this Document. |