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

- All Implemented Interfaces:
    SegmentCacheable
  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, simScorer`

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

      `parentQuery`

  - ### Constructor Summary

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

  - ### 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`.
    `boolean` | `isCacheable(LeafReaderContext ctx)`

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

      `extractTerms, extractTermStates`

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

      `explain, getSimScorer, matches, 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,TermStates> terms,
                                      SpanWeight bigWeight,
                                      SpanWeight littleWeight,
                                      float boost)
                               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

    - #### isCacheable

          public boolean isCacheable(LeafReaderContext ctx)

      Returns:
        `true` if the object can be cached against a given leaf

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