Class IndexReaderFunctions
- java.lang.Object
-
- org.apache.lucene.queries.function.IndexReaderFunctions
-
public final class IndexReaderFunctions extends Object
Class exposing static helper methods for generating DoubleValuesSource instances over some IndexReader statistics
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DoubleValuesSource
docCount(String field)
Creates a constant value source returning the docCount for a given fieldstatic DoubleValuesSource
docFreq(Term term)
Creates a constant value source returning the docFreq of a given termstatic DoubleValuesSource
maxDoc()
Creates a constant value source returning the index's maxDocstatic DoubleValuesSource
numDeletedDocs()
Creates a constant value source returning the number of deleted docs in the indexstatic DoubleValuesSource
numDocs()
Creates a constant value source returning the index's numDocsstatic DoubleValuesSource
sumDocFreq(String field)
Creates a constant value source returning the sumDocFreq for a given fieldstatic LongValuesSource
sumTotalTermFreq(String field)
Creates a constant value source returning the sumTotalTermFreq for a fieldstatic DoubleValuesSource
termFreq(Term term)
Creates a value source that returns the term freq of a given term for each documentstatic DoubleValuesSource
totalTermFreq(Term term)
Creates a constant value source returning the totalTermFreq for a given term
-
-
-
Method Detail
-
docFreq
public static DoubleValuesSource docFreq(Term term)
Creates a constant value source returning the docFreq of a given term- See Also:
IndexReader.docFreq(Term)
-
maxDoc
public static DoubleValuesSource maxDoc()
Creates a constant value source returning the index's maxDoc- See Also:
IndexReader.maxDoc()
-
numDocs
public static DoubleValuesSource numDocs()
Creates a constant value source returning the index's numDocs- See Also:
IndexReader.numDocs()
-
numDeletedDocs
public static DoubleValuesSource numDeletedDocs()
Creates a constant value source returning the number of deleted docs in the index- See Also:
IndexReader.numDeletedDocs()
-
sumTotalTermFreq
public static LongValuesSource sumTotalTermFreq(String field)
Creates a constant value source returning the sumTotalTermFreq for a field- See Also:
IndexReader.getSumTotalTermFreq(String)
-
termFreq
public static DoubleValuesSource termFreq(Term term)
Creates a value source that returns the term freq of a given term for each document- See Also:
PostingsEnum.freq()
-
totalTermFreq
public static DoubleValuesSource totalTermFreq(Term term)
Creates a constant value source returning the totalTermFreq for a given term- See Also:
IndexReader.totalTermFreq(Term)
-
sumDocFreq
public static DoubleValuesSource sumDocFreq(String field)
Creates a constant value source returning the sumDocFreq for a given field- See Also:
IndexReader.getSumDocFreq(String)
-
docCount
public static DoubleValuesSource docCount(String field)
Creates a constant value source returning the docCount for a given field- See Also:
IndexReader.getDocCount(String)
-
-