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 class
Custom 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 CharsRefBuilder
protected final SortedDocValues
protected final MutableValueStr
protected final ValueSource
-
Constructor Summary
ConstructorsModifierConstructorDescriptionDocTermsIndexDocValues
(ValueSource vs, LeafReaderContext context, String field) protected
DocTermsIndexDocValues
(ValueSource vs, SortedDocValues termsIndex) -
Method Summary
Modifier and TypeMethodDescriptionboolean
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 documentprotected int
getOrdForDoc
(int doc) getRangeScorer
(Weight weight, LeafReaderContext readerContext, String lowerVal, String upperVal, boolean includeLower, boolean includeUpper) Yields aScorer
that matches documents with values between the specified range, and that which produces scores equal toFunctionValues.floatVal(int)
.int
numOrd()
abstract Object
objectVal
(int doc) Native Java Object representation of the valueint
ordVal
(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:FunctionValues
Returns true if there is a value for this document- Overrides:
exists
in classFunctionValues
- Throws:
IOException
-
ordVal
- Overrides:
ordVal
in 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:
numOrd
in classFunctionValues
- Returns:
- the number of unique sort ordinals this instance has
-
bytesVal
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 classFunctionValues
- Throws:
IOException
-
strVal
- Overrides:
strVal
in classFunctionValues
- Throws:
IOException
-
boolVal
- Overrides:
boolVal
in classFunctionValues
- Throws:
IOException
-
objectVal
Description copied from class:FunctionValues
Native Java Object representation of the value- Overrides:
objectVal
in classFunctionValues
- Throws:
IOException
-
getRangeScorer
public ValueSourceScorer getRangeScorer(Weight weight, LeafReaderContext readerContext, String lowerVal, String upperVal, boolean includeLower, boolean includeUpper) throws IOException Description copied from class:FunctionValues
Yields aScorer
that matches documents with values between the specified range, and that which produces scores equal toFunctionValues.floatVal(int)
.- Overrides:
getRangeScorer
in classFunctionValues
- Throws:
IOException
-
toString
- Specified by:
toString
in classFunctionValues
- Throws:
IOException
-
getValueFiller
- Overrides:
getValueFiller
in classFunctionValues
-