org.apache.lucene.search.spans

## Class SpanContainingQuery.SpanContainingWeight

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

- Enclosing class:
    SpanContainingQuery

      public class SpanContainingQuery.SpanContainingWeight
      extends org.apache.lucene.search.spans.SpanContainQuery.SpanContainWeight

- - ### Nested Class Summary

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

      `SpanWeight.Postings`

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

      `Weight.DefaultBulkScorer`

  - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.search.spans.SpanWeight

      `field, similarity, simWeight`

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

      `parentQuery`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SpanContainingWeight(IndexSearcher searcher, Map<Term,TermContext> terms, SpanWeight bigWeight, SpanWeight littleWeight)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Spans` | `getSpans(LeafReaderContext context, SpanWeight.Postings requiredPostings)` Return spans from `big` that contain at least one spans from `little`.

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

      `extractTermContexts, extractTerms`

    - ### Methods inherited from class org.apache.lucene.search.spans.SpanWeight

      `explain, getSimScorer, getValueForNormalization, normalize, scorer`

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

      `bulkScorer, getQuery, scorerSupplier`

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

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

- - ### Constructor Detail

    - #### SpanContainingWeight

          public SpanContainingWeight(IndexSearcher searcher,
                                      Map<Term,TermContext> terms,
                                      SpanWeight bigWeight,
                                      SpanWeight littleWeight)
                               throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### 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

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