org.apache.lucene.queries.function.docvalues
Class DocTermsIndexDocValues

java.lang.Object
  extended by org.apache.lucene.queries.function.FunctionValues
      extended by org.apache.lucene.queries.function.docvalues.DocTermsIndexDocValues

public abstract class DocTermsIndexDocValues
extends FunctionValues

Internal class, subject to change. Serves as base class for FunctionValues based on DocTermsIndex.


Nested Class Summary
static class DocTermsIndexDocValues.DocTermsIndexException
           
 
Nested classes/interfaces inherited from class org.apache.lucene.queries.function.FunctionValues
FunctionValues.ValueFiller
 
Field Summary
protected  BytesRef spare
           
protected  CharsRef spareChars
           
protected  FieldCache.DocTermsIndex termsIndex
           
protected  MutableValueStr val
           
protected  ValueSource vs
           
 
Constructor Summary
DocTermsIndexDocValues(ValueSource vs, AtomicReaderContext context, String field)
           
 
Method Summary
 boolean boolVal(int doc)
           
 boolean bytesVal(int doc, BytesRef target)
          returns the bytes representation of the string val - TODO: should this return the indexed raw bytes not?
 boolean exists(int doc)
          Returns true if there is a value for this document
 FieldCache.DocTermsIndex getDocTermsIndex()
           
 ValueSourceScorer getRangeScorer(IndexReader reader, String lowerVal, String upperVal, boolean includeLower, boolean includeUpper)
           
 FunctionValues.ValueFiller getValueFiller()
           
abstract  Object objectVal(int doc)
          Native Java Object representation of the value
 String strVal(int doc)
           
 String toString(int doc)
           
protected abstract  String toTerm(String readableValue)
           
 
Methods inherited from class org.apache.lucene.queries.function.FunctionValues
byteVal, byteVal, doubleVal, doubleVal, explain, floatVal, floatVal, getScorer, intVal, intVal, longVal, longVal, numOrd, ordVal, shortVal, shortVal, strVal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

termsIndex

protected final FieldCache.DocTermsIndex termsIndex

vs

protected final ValueSource vs

val

protected final MutableValueStr val

spare

protected final BytesRef spare

spareChars

protected final CharsRef spareChars
Constructor Detail

DocTermsIndexDocValues

public DocTermsIndexDocValues(ValueSource vs,
                              AtomicReaderContext context,
                              String field)
                       throws IOException
Throws:
IOException
Method Detail

getDocTermsIndex

public FieldCache.DocTermsIndex getDocTermsIndex()

toTerm

protected abstract String toTerm(String readableValue)

exists

public boolean exists(int doc)
Description copied from class: FunctionValues
Returns true if there is a value for this document

Overrides:
exists in class FunctionValues

bytesVal

public boolean bytesVal(int doc,
                        BytesRef target)
Description copied from class: FunctionValues
returns the bytes representation of the string val - TODO: should this return the indexed raw bytes not?

Overrides:
bytesVal in class FunctionValues

strVal

public String strVal(int doc)
Overrides:
strVal in class FunctionValues

boolVal

public boolean boolVal(int doc)
Overrides:
boolVal in class FunctionValues

objectVal

public abstract Object objectVal(int doc)
Description copied from class: FunctionValues
Native Java Object representation of the value

Overrides:
objectVal in class FunctionValues

getRangeScorer

public ValueSourceScorer getRangeScorer(IndexReader reader,
                                        String lowerVal,
                                        String upperVal,
                                        boolean includeLower,
                                        boolean includeUpper)
Overrides:
getRangeScorer in class FunctionValues

toString

public String toString(int doc)
Specified by:
toString in class FunctionValues

getValueFiller

public FunctionValues.ValueFiller getValueFiller()
Overrides:
getValueFiller in class FunctionValues


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.