Class LuceneDocument

java.lang.Object
org.elasticsearch.index.mapper.LuceneDocument
All Implemented Interfaces:
Iterable<org.apache.lucene.index.IndexableField>

public class LuceneDocument extends Object implements Iterable<org.apache.lucene.index.IndexableField>
Fork of Document with additional functionality.
  • Constructor Details

    • LuceneDocument

      public LuceneDocument()
  • Method Details

    • getPath

      public String getPath()
      Return the path associated with this document.
    • getPrefix

      public String getPrefix()
      Return a prefix that all fields in this document should have.
    • getParent

      public LuceneDocument getParent()
      Return the parent document, or null if this is the root document.
    • iterator

      public Iterator<org.apache.lucene.index.IndexableField> iterator()
      Specified by:
      iterator in interface Iterable<org.apache.lucene.index.IndexableField>
    • getFields

      public List<org.apache.lucene.index.IndexableField> getFields()
    • addAll

      public void addAll(List<? extends org.apache.lucene.index.IndexableField> fields)
    • add

      public void add(org.apache.lucene.index.IndexableField field)
    • addWithKey

      public void addWithKey(Object key, org.apache.lucene.index.IndexableField field)
      Add fields so that they can later be fetched using getByKey(Object).
    • getByKey

      public org.apache.lucene.index.IndexableField getByKey(Object key)
      Get back fields that have been previously added with addWithKey(Object, IndexableField).
    • getFields

      public org.apache.lucene.index.IndexableField[] getFields(String name)
    • getField

      public org.apache.lucene.index.IndexableField getField(String name)
    • get

      public String get(String name)
    • getBinaryValue

      public org.apache.lucene.util.BytesRef getBinaryValue(String name)