Field
Create field with Reader value.
Parameters
field name
reader value
field type
Throws
if either the name or type is null, or if the field's type is stored(), or if tokenized() is false.
Create field with TokenStream value.
Parameters
field name
TokenStream value
field type
Throws
if either the name or type is null, or if the field's type is stored(), or if tokenized() is false, or if indexed() is false.
Create field with binary value.
NOTE: the provided byte[] is not copied so be sure not to change it until you're done with this field.
Parameters
field name
byte array pointing to binary content (not copied)
field type
Throws
if the field name, value or type is null, or the field's type is indexed().
Create field with binary value.
NOTE: the provided byte[] is not copied so be sure not to change it until you're done with this field.
Parameters
field name
byte array pointing to binary content (not copied)
starting position of the byte array
valid length of the byte array
field type
Throws
if the field name, value or type is null, or the field's type is indexed().
Create field with binary value.
NOTE: the provided BytesRef is not copied so be sure not to change it until you're done with this field.
Parameters
field name
BytesRef pointing to binary content (not copied)
field type
Throws
if the field name, bytes or type is null, or the field's type is indexed().
Create field with String value.
Parameters
field name
string value
field type
Throws
if either the name, value or type is null, or if the field's type is neither indexed() nor stored(), or if indexed() is false but storeTermVectors() is true.