public abstract class DocTermsIndexDocValues extends FunctionValues
Modifier and Type | Class and Description |
---|---|
static class |
DocTermsIndexDocValues.DocTermsIndexException
Custom Exception to be thrown when the DocTermsIndex for a field cannot be generated
|
FunctionValues.ValueFiller
Modifier and Type | Field and Description |
---|---|
protected CharsRefBuilder |
spareChars |
protected SortedDocValues |
termsIndex |
protected MutableValueStr |
val |
protected ValueSource |
vs |
Modifier | Constructor and Description |
---|---|
protected |
DocTermsIndexDocValues(String field,
ValueSource vs,
SortedDocValues termsIndex) |
|
DocTermsIndexDocValues(ValueSource vs,
LeafReaderContext context,
String field) |
Modifier and Type | Method and Description |
---|---|
boolean |
boolVal(int doc) |
boolean |
bytesVal(int doc,
BytesRefBuilder 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
|
protected int |
getOrdForDoc(int doc) |
ValueSourceScorer |
getRangeScorer(LeafReaderContext readerContext,
String lowerVal,
String upperVal,
boolean includeLower,
boolean includeUpper)
Yields a
Scorer that matches documents with values between the specified range,
and that which produces scores equal to FunctionValues.floatVal(int) . |
FunctionValues.ValueFiller |
getValueFiller() |
int |
numOrd() |
abstract Object |
objectVal(int doc)
Native Java Object representation of the value
|
int |
ordVal(int doc) |
String |
strVal(int doc) |
String |
toString(int doc) |
protected abstract String |
toTerm(String readableValue) |
protected final SortedDocValues termsIndex
protected final ValueSource vs
protected final MutableValueStr val
protected final CharsRefBuilder spareChars
public DocTermsIndexDocValues(ValueSource vs, LeafReaderContext context, String field) throws IOException
IOException
protected DocTermsIndexDocValues(String field, ValueSource vs, SortedDocValues termsIndex)
protected int getOrdForDoc(int doc) throws IOException
IOException
public boolean exists(int doc) throws IOException
FunctionValues
exists
in class FunctionValues
IOException
public int ordVal(int doc) throws IOException
ordVal
in class FunctionValues
doc
- The doc to retrieve to sort ordinal forIOException
public int numOrd()
numOrd
in class FunctionValues
public boolean bytesVal(int doc, BytesRefBuilder target) throws IOException
FunctionValues
bytesVal
in class FunctionValues
IOException
public String strVal(int doc) throws IOException
strVal
in class FunctionValues
IOException
public boolean boolVal(int doc) throws IOException
boolVal
in class FunctionValues
IOException
public abstract Object objectVal(int doc) throws IOException
FunctionValues
objectVal
in class FunctionValues
IOException
public ValueSourceScorer getRangeScorer(LeafReaderContext readerContext, String lowerVal, String upperVal, boolean includeLower, boolean includeUpper) throws IOException
FunctionValues
Scorer
that matches documents with values between the specified range,
and that which produces scores equal to FunctionValues.floatVal(int)
.getRangeScorer
in class FunctionValues
IOException
public String toString(int doc) throws IOException
toString
in class FunctionValues
IOException
public FunctionValues.ValueFiller getValueFiller()
getValueFiller
in class FunctionValues
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.