java.lang.Iterable<org.apache.lucene.index.IndexableField>
public static class ParseContext.Document
extends java.lang.Object
implements java.lang.Iterable<org.apache.lucene.index.IndexableField>
Document
with additional functionality.Constructor | Description |
---|---|
Document() |
Modifier and Type | Method | Description |
---|---|---|
void |
add(org.apache.lucene.index.IndexableField field) |
|
void |
addWithKey(java.lang.Object key,
org.apache.lucene.index.IndexableField field) |
Add fields so that they can later be fetched using
getByKey(Object) . |
java.lang.String |
get(java.lang.String name) |
|
org.apache.lucene.util.BytesRef |
getBinaryValue(java.lang.String name) |
|
org.apache.lucene.index.IndexableField |
getByKey(java.lang.Object key) |
Get back fields that have been previously added with
addWithKey(Object, IndexableField) . |
org.apache.lucene.index.IndexableField |
getField(java.lang.String name) |
|
java.util.List<org.apache.lucene.index.IndexableField> |
getFields() |
|
org.apache.lucene.index.IndexableField[] |
getFields(java.lang.String name) |
|
ParseContext.Document |
getParent() |
Return the parent document, or null if this is the root document.
|
java.lang.String |
getPath() |
Return the path associated with this document.
|
java.lang.String |
getPrefix() |
Return a prefix that all fields in this document should have.
|
java.lang.String[] |
getValues(java.lang.String name) |
Returns an array of values of the field specified as the method parameter.
|
java.util.Iterator<org.apache.lucene.index.IndexableField> |
iterator() |
public java.lang.String getPath()
public java.lang.String getPrefix()
public ParseContext.Document getParent()
public java.util.Iterator<org.apache.lucene.index.IndexableField> iterator()
iterator
in interface java.lang.Iterable<org.apache.lucene.index.IndexableField>
public java.util.List<org.apache.lucene.index.IndexableField> getFields()
public void add(org.apache.lucene.index.IndexableField field)
public void addWithKey(java.lang.Object key, org.apache.lucene.index.IndexableField field)
getByKey(Object)
.public org.apache.lucene.index.IndexableField getByKey(java.lang.Object key)
addWithKey(Object, IndexableField)
.public org.apache.lucene.index.IndexableField[] getFields(java.lang.String name)
public final java.lang.String[] getValues(java.lang.String name)
getFields()
.name
- the name of the fieldString[]
of field valuespublic org.apache.lucene.index.IndexableField getField(java.lang.String name)
public java.lang.String get(java.lang.String name)
public org.apache.lucene.util.BytesRef getBinaryValue(java.lang.String name)