Class DocTermsIndexDocValues
java.lang.Object
org.apache.lucene.queries.function.FunctionValues
org.apache.lucene.queries.function.docvalues.DocTermsIndexDocValues
Serves as base class for FunctionValues based on DocTermsIndex.
- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classCustom Exception to be thrown when the DocTermsIndex for a field cannot be generatedNested classes/interfaces inherited from class org.apache.lucene.queries.function.FunctionValues
FunctionValues.ValueFiller -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CharsRefBuilderprotected final SortedDocValuesprotected final MutableValueStrprotected final ValueSource -
Constructor Summary
ConstructorsModifierConstructorDescriptionDocTermsIndexDocValues(ValueSource vs, LeafReaderContext context, String field) protectedDocTermsIndexDocValues(ValueSource vs, SortedDocValues termsIndex) -
Method Summary
Modifier and TypeMethodDescriptionbooleanboolVal(int doc) booleanbytesVal(int doc, BytesRefBuilder target) returns the bytes representation of the string val - TODO: should this return the indexed raw bytes not?booleanexists(int doc) Returns true if there is a value for this documentprotected intgetOrdForDoc(int doc) getRangeScorer(LeafReaderContext readerContext, String lowerVal, String upperVal, boolean includeLower, boolean includeUpper) Yields aScorerthat matches documents with values between the specified range, and that which produces scores equal toFunctionValues.floatVal(int).intnumOrd()abstract ObjectobjectVal(int doc) Native Java Object representation of the valueintordVal(int doc) strVal(int doc) toString(int doc) protected abstract String
-
Field Details
-
termsIndex
-
vs
-
val
-
spareChars
-
-
Constructor Details
-
DocTermsIndexDocValues
public DocTermsIndexDocValues(ValueSource vs, LeafReaderContext context, String field) throws IOException - Throws:
IOException
-
DocTermsIndexDocValues
-
-
Method Details
-
getOrdForDoc
- Throws:
IOException
-
toTerm
-
exists
Description copied from class:FunctionValuesReturns true if there is a value for this document- Overrides:
existsin classFunctionValues- Throws:
IOException
-
ordVal
- Overrides:
ordValin classFunctionValues- Parameters:
doc- The doc to retrieve to sort ordinal for- Returns:
- the sort ordinal for the specified doc TODO: Maybe we can just use intVal for this...
- Throws:
IOException
-
numOrd
public int numOrd()- Overrides:
numOrdin classFunctionValues- Returns:
- the number of unique sort ordinals this instance has
-
bytesVal
Description copied from class:FunctionValuesreturns the bytes representation of the string val - TODO: should this return the indexed raw bytes not?- Overrides:
bytesValin classFunctionValues- Throws:
IOException
-
strVal
- Overrides:
strValin classFunctionValues- Throws:
IOException
-
boolVal
- Overrides:
boolValin classFunctionValues- Throws:
IOException
-
objectVal
Description copied from class:FunctionValuesNative Java Object representation of the value- Overrides:
objectValin classFunctionValues- Throws:
IOException
-
getRangeScorer
public ValueSourceScorer getRangeScorer(LeafReaderContext readerContext, String lowerVal, String upperVal, boolean includeLower, boolean includeUpper) throws IOException Description copied from class:FunctionValuesYields aScorerthat matches documents with values between the specified range, and that which produces scores equal toFunctionValues.floatVal(int).- Overrides:
getRangeScorerin classFunctionValues- Throws:
IOException
-
toString
- Specified by:
toStringin classFunctionValues- Throws:
IOException
-
getValueFiller
- Overrides:
getValueFillerin classFunctionValues
-