org.apache.lucene.search.payloads

## Class PayloadNearQuery.PayloadNearSpanScorer

- java.lang.Object
- - org.apache.lucene.search.DocIdSetIterator
  - - org.apache.lucene.search.Scorer
    - - org.apache.lucene.search.spans.SpanScorer
      - - org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanScorer

- Enclosing class:
    PayloadNearQuery

      public class PayloadNearQuery.PayloadNearSpanScorer
      extends SpanScorer

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected float` | `payloadScore`

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

      `doc, firstTime, freq, more, norms, value, weight`

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

      `NO_MORE_DOCS`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `PayloadNearSpanScorer(Spans spans, Weight weight, Similarity similarity, byte[] norms)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Explanation` | `explain(int doc)` Returns an explanation of the score for a document.
    `void` | `getPayloads(Spans[] subSpans)`
    `protected void` | `processPayloads(java.util.Collection payLoads, int start, int end)` By default, uses the `PayloadFunction` to score the payloads, but can be overridden to do other things.
    `float` | `score()` Returns the score of the current document matching the query.
    `protected boolean` | `setFreqCurrentDoc()`

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

      `advance, doc, docID, next, nextDoc, skipTo`

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

      `getSimilarity, score, score, score, score`

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

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

- - ### Field Detail

    - #### payloadScore

          protected float payloadScore

  - ### Constructor Detail

    - #### PayloadNearSpanScorer

          protected PayloadNearSpanScorer(Spans spans,
                                          Weight weight,
                                          Similarity similarity,
                                          byte[] norms)
                                   throws java.io.IOException

      Throws:
        `java.io.IOException`

  - ### Method Detail

    - #### getPayloads

          public void getPayloads(Spans[] subSpans)
                           throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### processPayloads

          protected void processPayloads(java.util.Collection payLoads,
                                         int start,
                                         int end)

      By default, uses the `PayloadFunction` to score the payloads, but can be overridden to do other things.
      Parameters:
        `payLoads` - The payloads
        `start` - The start position of the span being scored
        `end` - The end position of the span being scored
      See Also:
        `Spans`

    - #### setFreqCurrentDoc

          protected boolean setFreqCurrentDoc()
                                       throws java.io.IOException

      Overrides:
        `setFreqCurrentDoc` in class `SpanScorer`
      Throws:
        `java.io.IOException`

    - #### score

          public float score()
                      throws java.io.IOException

      Description copied from class: `Scorer`
      Returns the score of the current document matching the query. Initially invalid, until `DocIdSetIterator.next()` or `DocIdSetIterator.skipTo(int)` is called the first time, or when called from within `Collector.collect(int)`.
      Overrides:
        `score` in class `SpanScorer`
      Throws:
        `java.io.IOException`

    - #### explain

          public Explanation explain(int doc)
                              throws java.io.IOException

      Description copied from class: `Scorer`
      Returns an explanation of the score for a document.
      When this method is used, the `DocIdSetIterator.next()`, `DocIdSetIterator.skipTo(int)` and `Scorer.score(HitCollector)` methods should not be used.
      Overrides:
        `explain` in class `SpanScorer`
      Parameters:
        `doc` - The document number for the explanation.
      Throws:
        `java.io.IOException`

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