Class IDFValueSource
java.lang.Object
org.apache.lucene.queries.function.ValueSource
org.apache.lucene.queries.function.valuesource.DocFreqValueSource
org.apache.lucene.queries.function.valuesource.IDFValueSource
Function that returns
#idf(long, long)
for every document.
Note that the configured Similarity for the field must be
a subclass of TFIDFSimilarity
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.queries.function.valuesource.DocFreqValueSource
DocFreqValueSource.ConstDoubleDocValues, DocFreqValueSource.ConstIntDocValues -
Field Summary
Fields inherited from class org.apache.lucene.queries.function.valuesource.DocFreqValueSource
field, indexedBytes, indexedField, val -
Constructor Summary
ConstructorsConstructorDescriptionIDFValueSource(String field, String val, String indexedField, BytesRef indexedBytes) -
Method Summary
Modifier and TypeMethodDescription(package private) static TFIDFSimilarityasTFIDF(Similarity sim, String field) getValues(Map context, LeafReaderContext readerContext) Gets the values for this reader and the context that was previously passed to createWeight().name()Methods inherited from class org.apache.lucene.queries.function.valuesource.DocFreqValueSource
createWeight, description, equals, hashCodeMethods inherited from class org.apache.lucene.queries.function.ValueSource
asDoubleValuesSource, asLongValuesSource, fromDoubleValuesSource, getSortField, newContext, toString
-
Constructor Details
-
IDFValueSource
-
-
Method Details
-
name
- Overrides:
namein classDocFreqValueSource
-
getValues
Description copied from class:ValueSourceGets 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:
getValuesin classDocFreqValueSource- Throws:
IOException
-
asTFIDF
-