Class TermFreqValueSource
java.lang.Object
org.apache.lucene.queries.function.ValueSource
org.apache.lucene.queries.function.valuesource.DocFreqValueSource
org.apache.lucene.queries.function.valuesource.TermFreqValueSource
- Direct Known Subclasses:
TFValueSource
Function that returns
PostingsEnum.freq()
for the supplied term
in every document.
If the term does not exist in the document, returns 0. If frequencies are omitted, returns 1.
-
Field Summary
Fields inherited from class org.apache.lucene.queries.function.valuesource.DocFreqValueSource
field, indexedBytes, indexedField, val
-
Constructor Summary
ConstructorDescriptionTermFreqValueSource
(String field, String val, String indexedField, BytesRef indexedBytes) -
Method Summary
Methods inherited from class org.apache.lucene.queries.function.valuesource.DocFreqValueSource
createWeight, description, equals, hashCode
Methods inherited from class org.apache.lucene.queries.function.ValueSource
asDoubleValuesSource, asLongValuesSource, fromDoubleValuesSource, getSortField, newContext, toString
-
Constructor Details
-
TermFreqValueSource
-
-
Method Details
-
name
- Overrides:
name
in classDocFreqValueSource
-
getValues
public FunctionValues getValues(Map<Object, Object> context, LeafReaderContext readerContext) throws IOExceptionDescription copied from class:ValueSource
Gets the values for this reader and the context that was previously passed to createWeight(). The values must be consumed in a forward docID manner, and you must call this method again to iterate through the values again.- Overrides:
getValues
in classDocFreqValueSource
- Throws:
IOException
-