org.apache.lucene.search.spans

## Class AssertingSpanWeight

- java.lang.Object
- - org.apache.lucene.search.Weight
  - - org.apache.lucene.search.spans.SpanWeight
    - - org.apache.lucene.search.spans.AssertingSpanWeight

- All Implemented Interfaces:
    SegmentCacheable

      public class AssertingSpanWeight
      extends SpanWeight

  Wraps a SpanWeight with additional asserts

- - ### 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
    `AssertingSpanWeight(IndexSearcher searcher, SpanWeight in)` Create an AssertingSpanWeight

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Explanation` | `explain(LeafReaderContext context, int doc)`
    `void` | `extractTerms(Set<Term> terms)`
    `void` | `extractTermStates(Map<Term,TermStates> contexts)`
    `LeafSimScorer` | `getSimScorer(LeafReaderContext context)`
    `Spans` | `getSpans(LeafReaderContext context, SpanWeight.Postings requiredPostings)`
    `boolean` | `isCacheable(LeafReaderContext ctx)`
    `SpanScorer` | `scorer(LeafReaderContext context)`

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

      `matches`

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

    - #### AssertingSpanWeight

          public AssertingSpanWeight(IndexSearcher searcher,
                                     SpanWeight in)
                              throws IOException

      Create an AssertingSpanWeight
      Parameters:
        `in` - the SpanWeight to wrap
      Throws:
        `IOException` - on error

  - ### Method Detail

    - #### extractTermStates

          public void extractTermStates(Map<Term,TermStates> contexts)

      Specified by:
        `extractTermStates` in class `SpanWeight`

    - #### getSpans

          public Spans getSpans(LeafReaderContext context,
                                SpanWeight.Postings requiredPostings)
                         throws IOException

      Specified by:
        `getSpans` in class `SpanWeight`
      Throws:
        `IOException`

    - #### getSimScorer

          public LeafSimScorer getSimScorer(LeafReaderContext context)
                                     throws IOException

      Overrides:
        `getSimScorer` in class `SpanWeight`
      Throws:
        `IOException`

    - #### extractTerms

          public void extractTerms(Set<Term> terms)

      Specified by:
        `extractTerms` in class `Weight`

    - #### scorer

          public SpanScorer scorer(LeafReaderContext context)
                            throws IOException

      Overrides:
        `scorer` in class `SpanWeight`
      Throws:
        `IOException`

    - #### isCacheable

          public boolean isCacheable(LeafReaderContext ctx)

    - #### explain

          public Explanation explain(LeafReaderContext context,
                                     int doc)
                              throws IOException

      Overrides:
        `explain` in class `SpanWeight`
      Throws:
        `IOException`

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