Package org.apache.lucene.search

# Class TopScoreDocCollector.ScorerLeafCollector

java.lang.Object
org.apache.lucene.search.TopScoreDocCollector.ScorerLeafCollector

All Implemented Interfaces:
  `LeafCollector`

Enclosing class:
  `TopScoreDocCollector`

public abstract static class TopScoreDocCollector.ScorerLeafCollector extends Object implements LeafCollector
Scorable leaf collector

## Field Summary

Fields
Modifier and Type
Field
Description
`protected Scorable`
`scorer`

## Constructor Summary

Constructors
Constructor
Description
`ScorerLeafCollector()`

## Method Summary

Modifier and Type
Method
Description
`void`
`setScorer(Scorable scorer)`
Called before successive calls to `LeafCollector.collect(int)`.

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

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

### Methods inherited from interface org.apache.lucene.search.LeafCollector

`collect, collect, competitiveIterator, finish`

## Field Details

### scorer

protected Scorable scorer

## Constructor Details

### ScorerLeafCollector

public ScorerLeafCollector()

## Method Details

### setScorer

public void setScorer(Scorable scorer) throws IOException
Description copied from interface: `LeafCollector`
Called before successive calls to `LeafCollector.collect(int)`. Implementations that need the score of the current document (passed-in to `LeafCollector.collect(int)`), should save the passed-in Scorer and call scorer.score() when needed.

Specified by:
  `setScorer` in interface `LeafCollector`
Throws:
  `IOException`