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

-     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, simWeight`

    - ### 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` | `extractTermContexts(Map<Term,TermContext> contexts)`
    `void` | `extractTerms(Set<Term> terms)`
    `Similarity.SimScorer` | `getSimScorer(LeafReaderContext context)`
    `Spans` | `getSpans(LeafReaderContext context, SpanWeight.Postings requiredPostings)`
    `float` | `getValueForNormalization()`
    `void` | `normalize(float queryNorm, float boost)`
    `SpanScorer` | `scorer(LeafReaderContext context)`

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

    - #### extractTermContexts

          public void extractTermContexts(Map<Term,TermContext> contexts)

      Specified by:
        `extractTermContexts` in class `SpanWeight`

    - #### getSpans

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

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

    - #### getSimScorer

          public Similarity.SimScorer 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`

    - #### getValueForNormalization

          public float getValueForNormalization()
                                         throws IOException

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

    - #### normalize

          public void normalize(float queryNorm,
                                float boost)

      Overrides:
        `normalize` in class `SpanWeight`

    - #### scorer

          public SpanScorer scorer(LeafReaderContext context)
                            throws IOException

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

    - #### explain

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

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

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