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

Package 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
  Description
  `protected final Scorable`
  `in`

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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 Details

  - ### in

    protected final Scorable in

- ## Constructor Details

  - ### FilterScorable

    public FilterScorable(Scorable in)
    Filter a scorer
    Parameters:
      `in` - the scorer to filter

- ## Method Details

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

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