org.apache.lucene.search.spans

## Class SpanWithinQuery.SpanWithinWeight

- 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.SpanWithinQuery.SpanWithinWeight

- Enclosing class:
    SpanWithinQuery

      public class SpanWithinQuery.SpanWithinWeight
      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
    `SpanWithinWeight(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 `little` that are contained in a spans from `big`.

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

    - #### SpanWithinWeight

          public SpanWithinWeight(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 `little` that are contained in a spans from `big`. The payload is from the spans of `little`.
      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.