Package org.apache.lucene.search

## Class FilterCollector

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

- All Implemented Interfaces:
    `Collector`
  Direct Known Subclasses:
    `CachingCollector`, `PositiveScoresOnlyCollector`

      public abstract class FilterCollector
      extends Object
      implements Collector

  `Collector` delegator.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected Collector` | `in` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FilterCollector​(Collector in)` | Sole constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `LeafCollector` | `getLeafCollector​(LeafReaderContext context)` | Create a new `collector` to collect the given context.
    `ScoreMode` | `scoreMode()` | Indicates what features are required from the scorer.
    `void` | `setWeight​(Weight weight)` | Set the `Weight` that will be used to produce scorers that will feed `LeafCollector`s.
    `String` | `toString()` |

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

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

- - ### Field Detail

    - #### in

          protected final Collector in

  - ### Constructor Detail

    - #### FilterCollector

          public FilterCollector​(Collector in)

      Sole constructor.

  - ### 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`
      Parameters:
        `context` - next atomic reader context
      Throws:
        `IOException`

    - #### setWeight

          public void setWeight​(Weight weight)

      Description copied from interface: `Collector`
      Set the `Weight` that will be used to produce scorers that will feed `LeafCollector`s. This is typically useful to have access to `Weight.count(org.apache.lucene.index.LeafReaderContext)` from `Collector.getLeafCollector(org.apache.lucene.index.LeafReaderContext)`.
      Specified by:
        `setWeight` in interface `Collector`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### scoreMode

          public ScoreMode scoreMode()

      Description copied from interface: `Collector`
      Indicates what features are required from the scorer.
      Specified by:
        `scoreMode` in interface `Collector`