org.apache.lucene.search

## Class FilterCollector

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

- All Implemented Interfaces:
    Collector
  Direct Known Subclasses:
    CachingCollector, EarlyTerminatingSortingCollector, 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 and Description
    --- | ---
    `protected Collector` | `in`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FilterCollector(Collector in)` Sole constructor.

  - ### 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.
    `boolean` | `needsScores()` Indicates if document scores are needed by this collector.
    `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`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### needsScores

          public boolean needsScores()

      Description copied from interface: `Collector`
      Indicates if document scores are needed by this collector.
      Specified by:
        `needsScores` in interface `Collector`
      Returns:
        `true` if scores are needed.

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