Class TermFreqValueSource

  • Direct Known Subclasses:
    TFValueSource

    public class TermFreqValueSource
    extends DocFreqValueSource
    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.

    • Constructor Detail

      • TermFreqValueSource

        public TermFreqValueSource​(java.lang.String field,
                                   java.lang.String val,
                                   java.lang.String indexedField,
                                   BytesRef indexedBytes)
    • Method Detail

      • getValues

        public FunctionValues getValues​(java.util.Map context,
                                        LeafReaderContext 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(). 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 class DocFreqValueSource
        Throws:
        java.io.IOException