# Uses of Class
org.apache.lucene.index.TermStates

Packages that use TermStates
Package
Description
org.apache.lucene.index
Code to maintain and access indices.
org.apache.lucene.search
Code to search indices.

- ## Uses of TermStates in org.apache.lucene.index

  Methods in org.apache.lucene.index that return TermStates
  Modifier and Type
  Method
  Description
  `static TermStates`
  TermStates.`build(IndexSearcher indexSearcher, Term term, boolean needsStats)`
  Creates a `TermStates` from a top-level `IndexReaderContext` and the given `Term`.

- ## Uses of TermStates in org.apache.lucene.search

  Methods in org.apache.lucene.search that return TermStates
  Modifier and Type
  Method
  Description
  `TermStates`
  TermQuery.`getTermStates()`
  Returns the `TermStates` passed to the constructor, or null if it was not passed.
  Methods in org.apache.lucene.search with parameters of type TermStates
  Modifier and Type
  Method
  Description
  `BlendedTermQuery.Builder`
  BlendedTermQuery.Builder.`add(Term term, float boost, TermStates context)`
  Expert: Add a `Term` with the provided boost and context.
  `protected void`
  MultiTermQuery.TopTermsBlendedFreqScoringRewrite.`addClause(BlendedTermQuery.Builder topLevel, Term term, int docCount, float boost, TermStates states)`
  `protected void`
  MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite.`addClause(BooleanQuery.Builder topLevel, Term term, int docFreq, float boost, TermStates states)`
  `protected void`
  MultiTermQuery.TopTermsScoringBooleanQueryRewrite.`addClause(BooleanQuery.Builder topLevel, Term term, int docCount, float boost, TermStates states)`
  Constructors in org.apache.lucene.search with parameters of type TermStates
  Modifier
  Constructor
  Description
  ``
  `TermQuery(Term t, TermStates states)`
  Expert: constructs a TermQuery that will use the provided docFreq instead of looking up the docFreq against the searcher.