Example usage for Java org.apache.lucene.document Document fields, constructors, methods, implement or subclass
The text is from its open source code.
List | fields |
Document() Constructs a new document with no fields. |
void | add(IndexableField field) Adds a field to a document. |
void | clear() Removes all the fields from document. |
String | get(String name) Returns the string value of the field with the given name if any exist in this document, or null. |
BytesRef | getBinaryValue(String name) Returns an array of bytes for the first (or only) field that has the name specified as the method parameter. |
BytesRef[] | getBinaryValues(String name) Returns an array of byte arrays for of the fields that have the name specified as the method parameter. |
IndexableField | getField(String name) Returns a field with the given name if any exist in this document, or null. |
IndexableField[] | getFields(String name) Returns an array of IndexableField s with the given name. |
List | getFields() Returns a List of all the fields in a document. |
String[] | getValues(String name) Returns an array of values of the field specified as the method parameter. |
Iterator | iterator() |
void | removeField(String name) Removes field with the specified name from the document. |
void | removeFields(String name) Removes all fields with the given name from the document. |
String | toString() Prints the fields of a document for human consumption. |