Java org.apache.lucene.document Document fields, constructors, methods, implement or subclass

Example usage for Java org.apache.lucene.document Document fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.lucene.document Document.

The text is from its open source code.

Field

Listfields

Constructor

Document()
Constructs a new document with no fields.

Method

voidadd(IndexableField field)

Adds a field to a document.

voidclear()
Removes all the fields from document.
Stringget(String name)
Returns the string value of the field with the given name if any exist in this document, or null.
BytesRefgetBinaryValue(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.
IndexableFieldgetField(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.
ListgetFields()
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.
Iteratoriterator()
voidremoveField(String name)

Removes field with the specified name from the document.

voidremoveFields(String name)

Removes all fields with the given name from the document.

StringtoString()
Prints the fields of a document for human consumption.