org.apache.lucene.search

## Class FilterScorable

- java.lang.Object
- - org.apache.lucene.search.Scorable
  - - org.apache.lucene.search.FilterScorable

-     public class FilterScorable
      extends Scorable

  Filter a `Scorable`, intercepting methods and optionally changing their return values The default implementation simply passes all calls to its delegate, with the exception of `Scorable.setMinCompetitiveScore(float)` which defaults to a no-op.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.lucene.search.Scorable

      `Scorable.ChildScorable`

  - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FilterScorable(Scorable in)` Filter a scorer

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `docID()` Returns the doc ID that is currently being scored.
    `Collection<Scorable.ChildScorable>` | `getChildren()` Returns child sub-scorers positioned on the current document
    `float` | `score()` Returns the score of the current document matching the query.

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

      `setMinCompetitiveScore, smoothingScore`

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

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

- - ### Field Detail

    - #### in

          protected final Scorable in

  - ### Constructor Detail

    - #### FilterScorable

          public FilterScorable(Scorable in)

      Filter a scorer
      Parameters:
        `in` - the scorer to filter

  - ### Method Detail

    - #### score

          public float score()
                      throws IOException

      Description copied from class: `Scorable`
      Returns the score of the current document matching the query.
      Specified by:
        `score` in class `Scorable`
      Throws:
        `IOException`

    - #### docID

          public int docID()

      Description copied from class: `Scorable`
      Returns the doc ID that is currently being scored.
      Specified by:
        `docID` in class `Scorable`

    - #### getChildren

          public Collection<Scorable.ChildScorable> getChildren()
                                                         throws IOException

      Description copied from class: `Scorable`
      Returns child sub-scorers positioned on the current document
      Overrides:
        `getChildren` in class `Scorable`
      Throws:
        `IOException`

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