Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.queries.function.valuesource
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 returns `DocsEnum.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.

Field Summary

Fields inherited from class org.apache.lucene.queries.function.valuesource.DocFreqValueSource
`field, indexedBytes, indexedField, val`

Constructor Summary
`TermFreqValueSource(String field, String val, String indexedField, BytesRef indexedBytes)`

Method Summary
`FunctionValues` | `getValues(Map context, AtomicReaderContext readerContext)` Gets the values for this reader and the context that was previously passed to createWeight()
`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`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### TermFreqValueSource

    public TermFreqValueSource(String field,
                               String val,
                               String indexedField,
                               BytesRef indexedBytes)

Method Detail

### name

    public String name()

  Overrides:
    `name` in class `DocFreqValueSource`

### getValues

    public FunctionValues getValues(Map context,
                                    AtomicReaderContext readerContext)
                             throws IOException

  Description copied from class: `ValueSource`
  Gets the values for this reader and the context that was previously passed to createWeight()

  Overrides:
    `getValues` in class `DocFreqValueSource`
  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.