org.apache.lucene.search.payloads

## Class PayloadNearQuery.PayloadNearSpanScorer

- java.lang.Object
- - org.apache.lucene.search.DocIdSetIterator
  - - org.apache.lucene.index.DocsEnum
    - - 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

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.lucene.search.Scorer

`Scorer.ChildScorer`

### Field Summary

Fields
`protected float` `payloadScore`

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

`doc, docScorer, freq, more, numMatches`

### Fields inherited from class org.apache.lucene.search.Scorer

`weight`

### Fields inherited from class org.apache.lucene.index.DocsEnum

`FLAG_FREQS, FLAG_NONE`

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

`NO_MORE_DOCS`

### Constructor Summary

Constructors
`protected` `PayloadNearQuery.PayloadNearSpanScorer(Spans spans, Weight weight, Similarity similarity, Similarity.SloppySimScorer docScorer)`

### Method Summary

Methods
`void` `getPayloads(Spans[] subSpans)`
`protected void` `processPayloads(Collection<byte[]> 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, docID, freq, nextDoc, sloppyFreq`

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

`getChildren, getWeight, score, score`

### Methods inherited from class org.apache.lucene.index.DocsEnum

`attributes`

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

#### PayloadNearQuery.PayloadNearSpanScorer

    protected PayloadNearQuery.PayloadNearSpanScorer(Spans spans,
                                          Weight weight,
                                          Similarity similarity,
                                          Similarity.SloppySimScorer docScorer)
                                              throws IOException

Throws:
  `IOException`

### Method Detail

#### getPayloads

    public void getPayloads(Spans[] subSpans)
                     throws IOException

Throws:
  `IOException`

#### processPayloads

    protected void processPayloads(Collection<byte[]> 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 IOException

Overrides:
  `setFreqCurrentDoc` in class `SpanScorer`
Throws:
  `IOException`

#### score

    public float score()
                throws IOException

Description copied from class: `Scorer`
Returns the score of the current document matching the query. Initially invalid, until `DocIdSetIterator.nextDoc()` or `DocIdSetIterator.advance(int)` is called the first time, or when called from within `Collector.collect(int)`.

Overrides:
  `score` in class `SpanScorer`
Throws:
  `IOException`