org.apache.lucene.index

## Class Impacts

- java.lang.Object
- - org.apache.lucene.index.Impacts

-     public abstract class Impacts
      extends Object

  Information about upcoming impacts, ie. (freq, norm) pairs.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Impacts()` Sole constructor.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract int` | `getDocIdUpTo(int level)` Return the maximum inclusive doc ID until which the list of impacts returned by `getImpacts(int)` is valid.
    `abstract List<Impact>` | `getImpacts(int level)` Return impacts on the given level.
    `abstract int` | `numLevels()` Return the number of levels on which we have impacts.

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

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

- - ### Constructor Detail

    - #### Impacts

          protected Impacts()

      Sole constructor. Typically invoked by sub classes.

  - ### Method Detail

    - #### numLevels

          public abstract int numLevels()

      Return the number of levels on which we have impacts. The returned value is always greater than 0 and may not always be the same, even on a single postings list, depending on the current doc ID.

    - #### getDocIdUpTo

          public abstract int getDocIdUpTo(int level)

      Return the maximum inclusive doc ID until which the list of impacts returned by `getImpacts(int)` is valid. This is a non-decreasing function of `level`.

    - #### getImpacts

          public abstract List<Impact> getImpacts(int level)

      Return impacts on the given level. These impacts are sorted by increasing frequency and increasing unsigned norm, and only valid until the doc ID returned by `getDocIdUpTo(int)` for the same level, included. The returned list is never empty. NOTE: There is no guarantee that these impacts actually appear in postings, only that they trigger scores that are greater than or equal to the impacts that actually appear in postings.

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