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 and Description
    `PositiveScoresOnlyCollector(Collector in)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `LeafCollector` | `getLeafCollector(LeafReaderContext context)` Create a new `collector` to collect the given context.

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

      `scoreMode, toString`

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

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

- - ### Constructor Detail

    - #### PositiveScoresOnlyCollector

          public PositiveScoresOnlyCollector(Collector in)

  - ### Method Detail

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

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