org.apache.lucene.queries.function

## 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
`static DoubleValuesSource` `docCount(String field)` Creates a constant value source returning the docCount for a given field
`static DoubleValuesSource` `docFreq(Term term)` Creates a constant value source returning the docFreq of a given term
`static DoubleValuesSource` `maxDoc()` Creates a constant value source returning the index's maxDoc
`static DoubleValuesSource` `numDeletedDocs()` Creates a constant value source returning the number of deleted docs in the index
`static DoubleValuesSource` `numDocs()` Creates a constant value source returning the index's numDocs
`static DoubleValuesSource` `sumDocFreq(String field)` Creates a constant value source returning the sumDocFreq for a given field
`static LongValuesSource` `sumTotalTermFreq(String field)` Creates a constant value source returning the sumTotalTermFreq for a field
`static DoubleValuesSource` `termFreq(Term term)` Creates a value source that returns the term freq of a given term for each document
`static DoubleValuesSource` `totalTermFreq(Term term)` Creates a constant value source returning the totalTermFreq for a given term

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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)`