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
public class TermFreqValueSource extends DocFreqValueSource
Function that returnsDocsEnum.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.
-
-
Constructor Summary
Constructors Constructor Description TermFreqValueSource(java.lang.String field, java.lang.String val, java.lang.String indexedField, BytesRef indexedBytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FunctionValues
getValues(java.util.Map context, AtomicReaderContext readerContext)
Gets the values for this reader and the context that was previously passed to createWeight()java.lang.String
name()
-
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
getSortField, newContext, toString
-
-
-
-
Constructor Detail
-
TermFreqValueSource
public TermFreqValueSource(java.lang.String field, java.lang.String val, java.lang.String indexedField, BytesRef indexedBytes)
-
-
Method Detail
-
name
public java.lang.String name()
- Overrides:
name
in classDocFreqValueSource
-
getValues
public FunctionValues getValues(java.util.Map context, AtomicReaderContext readerContext) throws java.io.IOException
Description copied from class:ValueSource
Gets the values for this reader and the context that was previously passed to createWeight()- Overrides:
getValues
in classDocFreqValueSource
- Throws:
java.io.IOException
-
-