Package org.apache.lucene.queries.spans

# Class SpanContainingQuery.SpanContainingWeight

java.lang.Object
org.apache.lucene.search.Weight
org.apache.lucene.queries.spans.SpanWeight
org.apache.lucene.queries.spans.SpanContainQuery.SpanContainWeight
org.apache.lucene.queries.spans.SpanContainingQuery.SpanContainingWeight

All Implemented Interfaces:
  `SegmentCacheable`

Enclosing class:
  `SpanContainingQuery`

public class SpanContainingQuery.SpanContainingWeight extends org.apache.lucene.queries.spans.SpanContainQuery.SpanContainWeight
Creates SpanContainingQuery scorer instances

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.apache.lucene.queries.spans.SpanWeight

  `SpanWeight.Postings`

  ## Nested classes/interfaces inherited from class org.apache.lucene.search.Weight

  `Weight.DefaultBulkScorer, Weight.DefaultScorerSupplier`

- ## Field Summary

  ### Fields inherited from class org.apache.lucene.queries.spans.SpanWeight

  `field, similarity, simScorer`

  ### Fields inherited from class org.apache.lucene.search.Weight

  `parentQuery`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SpanContainingWeight(IndexSearcher searcher, Map<Term,TermStates> terms, SpanWeight bigWeight, SpanWeight littleWeight, float boost)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Spans`
  `getSpans(LeafReaderContext context, SpanWeight.Postings requiredPostings)`
  Return spans from `big` that contain at least one spans from `little`.
  `boolean`
  `isCacheable(LeafReaderContext ctx)`
  `ScorerSupplier`
  `scorerSupplier(LeafReaderContext context)`

  ### Methods inherited from class org.apache.lucene.queries.spans.SpanContainQuery.SpanContainWeight

  `extractTermStates`

  ### Methods inherited from class org.apache.lucene.queries.spans.SpanWeight

  `explain, getSimScorer, matches`

  ### Methods inherited from class org.apache.lucene.search.Weight

  `bulkScorer, count, getQuery, scorer`

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

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

- ## Constructor Details

  - ### SpanContainingWeight

    public SpanContainingWeight(IndexSearcher searcher, Map<Term,TermStates> terms, SpanWeight bigWeight, SpanWeight littleWeight, float boost) throws IOException
    Throws:
      `IOException`

- ## Method Details

  - ### getSpans

    public Spans getSpans(LeafReaderContext context, SpanWeight.Postings requiredPostings) throws IOException
    Return spans from `big` that contain at least one spans from `little`. The payload is from the spans of `big`.
    Specified by:
      `getSpans` in class `SpanWeight`
    Parameters:
      `context` - a LeafReaderContext for this Spans
    Returns:
      a Spans
    Throws:
      `IOException` - on error

  - ### isCacheable

    public boolean isCacheable(LeafReaderContext ctx)

  - ### scorerSupplier

    public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOException
    Overrides:
      `scorerSupplier` in class `SpanWeight`
    Throws:
      `IOException`