org.apache.solr.search

## Class EarlyTerminatingCollectorException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - org.apache.solr.search.EarlyTerminatingCollectorException

- All Implemented Interfaces:
    Serializable

      public class EarlyTerminatingCollectorException
      extends RuntimeException

  Thrown by `EarlyTerminatingCollector` when the maximum to abort the scoring / collection process early, when the specified maximum number of documents were collected.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EarlyTerminatingCollectorException(int numberCollected, int numberScanned)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getNumberCollected()` The number of documents collected that resulted in early termination
    `int` | `getNumberScanned()` The total number of documents in the index that were "scanned" by the index when collecting the `getNumberCollected()` documents that triggered this exception.

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

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

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

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

- - ### Constructor Detail

    - #### EarlyTerminatingCollectorException

          public EarlyTerminatingCollectorException(int numberCollected,
                                                    int numberScanned)

  - ### Method Detail

    - #### getNumberScanned

          public int getNumberScanned()

      The total number of documents in the index that were "scanned" by the index when collecting the `getNumberCollected()` documents that triggered this exception.

      This number represents the sum of:

      - The total number of documents in all LeafReaders that were fully exhausted during collection
      - The id of the last doc collected in the last LeafReader consulted during collection.

    - #### getNumberCollected

          public int getNumberCollected()

      The number of documents collected that resulted in early termination

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