PositiveScoresOnlyCollector (Lucene 10.5.0 core API)
Description: declaration: package: org.apache.lucene.search, class: PositiveScoresOnlyCollector

Package org.apache.lucene.search

# Class PositiveScoresOnlyCollector

java.lang.Object
org.apache.lucene.search.FilterCollector
org.apache.lucene.search.PositiveScoresOnlyCollector

All Implemented Interfaces:
  `Collector`

public class PositiveScoresOnlyCollector extends FilterCollector
A `Collector` implementation which wraps another `Collector` and makes sure only documents with scores > 0 are collected.

- ## Field Summary

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

  `in`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PositiveScoresOnlyCollector(Collector in)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `LeafCollector`
  `getLeafCollector(LeafReaderContext context)`
  Create a new `collector` to collect the given context.

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

  `scoreMode, setWeight, toString`

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

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

- ## Constructor Details

  - ### PositiveScoresOnlyCollector

    public PositiveScoresOnlyCollector(Collector in)

- ## Method Details

  - ### getLeafCollector

    public LeafCollector getLeafCollector(LeafReaderContext context) throws IOException
    Description copied from interface: `Collector`
    Create a new `collector` to collect the given context.
    Specified by:
      `getLeafCollector` in interface `Collector`
    Overrides:
      `getLeafCollector` in class `FilterCollector`
    Parameters:
      `context` - next atomic reader context
    Throws:
      `IOException`