Example usage for Java org.apache.lucene.document Field fields, constructors, methods, implement or subclass
The text is from its open source code.
String | name Field's name |
TokenStream | tokenStream Pre-analyzed tokenStream for indexed fields; this is separate from fieldsData because you are allowed to have both; eg maybe field has a String value but you customize how it's tokenized |
Field(String name, IndexableFieldType type) Expert: creates a field with no initial value. | |
Field(String name, Reader reader, IndexableFieldType type) Create field with Reader value. | |
Field(String name, TokenStream tokenStream, IndexableFieldType type) Create field with TokenStream value. | |
Field(String name, byte[] value, IndexableFieldType type) Create field with binary value. | |
Field(String name, BytesRef bytes, IndexableFieldType type) Create field with binary value. | |
Field(String name, CharSequence value, IndexableFieldType type) Create field with String value. | |
Field(String name, byte[] value, int offset, int length, IndexableFieldType type) Create field with binary value. |
BytesRef | binaryValue() |
IndexableFieldType | fieldType() Returns the FieldType for this field. |
Number | numericValue() |
Reader | readerValue() The value of the field as a Reader, or null. |
void | setBytesValue(byte[] value) Expert: change the value of this field. |
void | setBytesValue(BytesRef value) Expert: change the value of this field. |
void | setByteValue(byte value) Expert: change the value of this field. |
void | setDoubleValue(double value) Expert: change the value of this field. |
void | setFloatValue(float value) Expert: change the value of this field. |
void | setIntValue(int value) Expert: change the value of this field. |
void | setLongValue(long value) Expert: change the value of this field. |
void | setReaderValue(Reader value) Expert: change the value of this field. |
void | setShortValue(short value) Expert: change the value of this field. |
void | setStringValue(String value) Expert: change the value of this field. |
void | setTokenStream(TokenStream tokenStream) Expert: sets the token stream to be used for indexing and causes isIndexed() and isTokenized() to return true. |
String | stringValue() The value of the field as a String, or null. |
TokenStream | tokenStreamValue() The TokenStream for this field to be used when indexing, or null. |
String | toString() Prints a Field for human consumption. |