Package org.elasticsearch.index.mapper
Class ParseContext.Document
java.lang.Object
org.elasticsearch.index.mapper.ParseContext.Document
- All Implemented Interfaces:
java.lang.Iterable<org.apache.lucene.index.IndexableField>
- Enclosing class:
- ParseContext
public static class ParseContext.Document
extends java.lang.Object
implements java.lang.Iterable<org.apache.lucene.index.IndexableField>
Fork of
Document with additional functionality.-
Constructor Summary
Constructors Constructor Description Document() -
Method Summary
Modifier and Type Method Description voidadd(org.apache.lucene.index.IndexableField field)voidaddWithKey(java.lang.Object key, org.apache.lucene.index.IndexableField field)Add fields so that they can later be fetched usinggetByKey(Object).java.lang.Stringget(java.lang.String name)org.apache.lucene.util.BytesRefgetBinaryValue(java.lang.String name)org.apache.lucene.index.IndexableFieldgetByKey(java.lang.Object key)Get back fields that have been previously added withaddWithKey(Object, IndexableField).org.apache.lucene.index.IndexableFieldgetField(java.lang.String name)java.util.List<org.apache.lucene.index.IndexableField>getFields()org.apache.lucene.index.IndexableField[]getFields(java.lang.String name)ParseContext.DocumentgetParent()Return the parent document, or null if this is the root document.java.lang.StringgetPath()Return the path associated with this document.java.lang.StringgetPrefix()Return a prefix that all fields in this document should have.java.util.Iterator<org.apache.lucene.index.IndexableField>iterator()
-
Constructor Details
-
Document
public Document()
-
-
Method Details
-
getPath
public java.lang.String getPath()Return the path associated with this document. -
getPrefix
public java.lang.String getPrefix()Return a prefix that all fields in this document should have. -
getParent
Return the parent document, or null if this is the root document. -
iterator
public java.util.Iterator<org.apache.lucene.index.IndexableField> iterator()- Specified by:
iteratorin interfacejava.lang.Iterable<org.apache.lucene.index.IndexableField>
-
getFields
public java.util.List<org.apache.lucene.index.IndexableField> getFields() -
add
public void add(org.apache.lucene.index.IndexableField field) -
addWithKey
public void addWithKey(java.lang.Object key, org.apache.lucene.index.IndexableField field)Add fields so that they can later be fetched usinggetByKey(Object). -
getByKey
public org.apache.lucene.index.IndexableField getByKey(java.lang.Object key)Get back fields that have been previously added withaddWithKey(Object, IndexableField). -
getFields
public org.apache.lucene.index.IndexableField[] getFields(java.lang.String name) -
getField
public org.apache.lucene.index.IndexableField getField(java.lang.String name) -
get
public java.lang.String get(java.lang.String name) -
getBinaryValue
public org.apache.lucene.util.BytesRef getBinaryValue(java.lang.String name)
-