org.elasticsearch.index.field.data
Class FieldData<Doc extends DocFieldData>

java.lang.Object
  extended by org.elasticsearch.index.field.data.FieldData<Doc>
Direct Known Subclasses:
GeoPointFieldData, NumericFieldData, StringFieldData

public abstract class FieldData<Doc extends DocFieldData>
extends Object


Nested Class Summary
static interface FieldData.OrdinalInDocProc
           
static interface FieldData.StringValueInDocProc
           
static interface FieldData.StringValueProc
           
 
Constructor Summary
protected FieldData(String fieldName)
           
 
Method Summary
protected abstract  long computeSizeInBytes()
           
protected abstract  Doc createFieldData()
           
 Doc docFieldData(int docId)
           
 String fieldName()
          The field name of this field data.
abstract  void forEachOrdinalInDoc(int docId, FieldData.OrdinalInDocProc proc)
           
abstract  void forEachValue(FieldData.StringValueProc proc)
           
abstract  void forEachValueInDoc(int docId, FieldData.StringValueInDocProc proc)
           
abstract  boolean hasValue(int docId)
          Is there a value associated with this document id.
static FieldData load(FieldDataType type, org.apache.lucene.index.IndexReader reader, String fieldName)
           
abstract  boolean multiValued()
          Is the field data a multi valued one (has multiple values / terms per document id) or not.
 long sizeInBytes()
           
abstract  String stringValue(int docId)
           
abstract  FieldDataType type()
          The type of this field data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldData

protected FieldData(String fieldName)
Method Detail

fieldName

public final String fieldName()
The field name of this field data.


docFieldData

public Doc docFieldData(int docId)

sizeInBytes

public long sizeInBytes()

computeSizeInBytes

protected abstract long computeSizeInBytes()

createFieldData

protected abstract Doc createFieldData()

multiValued

public abstract boolean multiValued()
Is the field data a multi valued one (has multiple values / terms per document id) or not.


hasValue

public abstract boolean hasValue(int docId)
Is there a value associated with this document id.


stringValue

public abstract String stringValue(int docId)

forEachValue

public abstract void forEachValue(FieldData.StringValueProc proc)

forEachValueInDoc

public abstract void forEachValueInDoc(int docId,
                                       FieldData.StringValueInDocProc proc)

forEachOrdinalInDoc

public abstract void forEachOrdinalInDoc(int docId,
                                         FieldData.OrdinalInDocProc proc)

type

public abstract FieldDataType type()
The type of this field data.


load

public static FieldData load(FieldDataType type,
                             org.apache.lucene.index.IndexReader reader,
                             String fieldName)
                      throws IOException
Throws:
IOException


Copyright © 2009-2012. All Rights Reserved.