|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.lucene.document.Document
Documents are the unit of indexing and search. A Document is a set of fields. Each field has a name and a textual value. A field may be stored with the document, in which case it is returned with search hits on the document. Thus each document should typically contain stored fields which uniquely identify it.
Constructor Summary | |
Document()
Constructs a new document with no fields. |
Method Summary | |
void |
add(Field field)
Adds a field to a document. |
Enumeration |
fields()
Returns an Enumeration of all the fields in a document. |
String |
get(String name)
Returns the string value of the field with the given name if any exist in this document, or null. |
Field |
getField(String name)
Returns a field with the given name if any exist in this document, or null. |
String |
toString()
Prints the fields of a document for human consumption. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Document()
Method Detail |
public final void add(Field field)
public final Field getField(String name)
public final String get(String name)
public final Enumeration fields()
public final String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |