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

- Packages that use TermContext
  Package | Description
  --- | ---
  org.apache.lucene.index | Code to maintain and access indices.
  org.apache.lucene.search | Code to search indices.
  org.apache.lucene.search.spans | The calculus of spans.

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

    Methods in org.apache.lucene.index that return TermContext
    Modifier and Type | Method and Description
    --- | ---
    `static TermContext` | TermContext.`build(IndexReaderContext context, Term term)` Creates a `TermContext` from a top-level `IndexReaderContext` and the given `Term`.

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

    Methods in org.apache.lucene.search with parameters of type TermContext
    Modifier and Type | Method and Description
    --- | ---
    `BlendedTermQuery.Builder` | BlendedTermQuery.Builder.`add(Term term, float boost, TermContext 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, TermContext states)`
    `protected void` | MultiTermQuery.TopTermsScoringBooleanQueryRewrite.`addClause(BooleanQuery.Builder topLevel, Term term, int docCount, float boost, TermContext states)`
    `protected void` | MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite.`addClause(BooleanQuery.Builder topLevel, Term term, int docFreq, float boost, TermContext states)`
    `TermStatistics` | IndexSearcher.`termStatistics(Term term, TermContext context)` Returns `TermStatistics` for a term.

    Constructors in org.apache.lucene.search with parameters of type TermContext
    Constructor and Description
    `TermQuery(Term t, TermContext states)` Expert: constructs a TermQuery that will use the provided docFreq instead of looking up the docFreq against the searcher.

  - ### Uses of TermContext in org.apache.lucene.search.spans

    Fields in org.apache.lucene.search.spans declared as TermContext
    Modifier and Type | Field and Description
    --- | ---
    `protected TermContext` | SpanTermQuery.`termContext`

    Methods in org.apache.lucene.search.spans that return types with arguments of type TermContext
    Modifier and Type | Method and Description
    --- | ---
    `static Map<Term,TermContext>` | SpanQuery.`getTermContexts(Collection<SpanWeight> weights)` Build a map of terms to termcontexts, for use in constructing SpanWeights
    `static Map<Term,TermContext>` | SpanQuery.`getTermContexts(SpanWeight... weights)` Build a map of terms to termcontexts, for use in constructing SpanWeights

    Method parameters in org.apache.lucene.search.spans with type arguments of type TermContext
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | SpanWeight.`extractTermContexts(Map<Term,TermContext> contexts)` Collect all TermContexts used by this Weight
    `void` | SpanPositionCheckQuery.SpanPositionCheckWeight.`extractTermContexts(Map<Term,TermContext> contexts)`
    `void` | SpanNotQuery.SpanNotWeight.`extractTermContexts(Map<Term,TermContext> contexts)`
    `void` | SpanNearQuery.SpanNearWeight.`extractTermContexts(Map<Term,TermContext> contexts)`
    `void` | SpanTermQuery.SpanTermWeight.`extractTermContexts(Map<Term,TermContext> contexts)`
    `void` | SpanOrQuery.SpanOrWeight.`extractTermContexts(Map<Term,TermContext> contexts)`

    Constructors in org.apache.lucene.search.spans with parameters of type TermContext
    Constructor and Description
    `SpanTermQuery(Term term, TermContext context)` Expert: Construct a SpanTermQuery matching the named term's spans, using the provided TermContext
    `SpanTermWeight(TermContext termContext, IndexSearcher searcher, Map<Term,TermContext> terms)`

    Constructor parameters in org.apache.lucene.search.spans with type arguments of type TermContext
    Constructor and Description
    `SpanContainingWeight(IndexSearcher searcher, Map<Term,TermContext> terms, SpanWeight bigWeight, SpanWeight littleWeight)`
    `SpanNearWeight(List<SpanWeight> subWeights, IndexSearcher searcher, Map<Term,TermContext> terms)`
    `SpanNotWeight(IndexSearcher searcher, Map<Term,TermContext> terms, SpanWeight includeWeight, SpanWeight excludeWeight)`
    `SpanOrWeight(IndexSearcher searcher, Map<Term,TermContext> terms, List<SpanWeight> subWeights)`
    `SpanPositionCheckWeight(SpanWeight matchWeight, IndexSearcher searcher, Map<Term,TermContext> terms)`
    `SpanTermWeight(TermContext termContext, IndexSearcher searcher, Map<Term,TermContext> terms)`
    `SpanWeight(SpanQuery query, IndexSearcher searcher, Map<Term,TermContext> termContexts)` Create a new SpanWeight
    `SpanWithinWeight(IndexSearcher searcher, Map<Term,TermContext> terms, SpanWeight bigWeight, SpanWeight littleWeight)`

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