The TimeLimitingCollector type exposes the following members.
Constructors
Name | Description | |
---|---|---|
TimeLimitingCollector | Create a TimeLimitedCollector wrapper over another {@link Collector} with a specified timeout. |
Methods
Name | Description | |
---|---|---|
AcceptsDocsOutOfOrder | (Overrides Collector..::..AcceptsDocsOutOfOrder()()()().) | |
Collect | Calls {@link Collector#Collect(int)} on the decorated {@link Collector}
unless the allowed time has passed, in which case it throws an exception.
(Overrides Collector..::..Collect(Int32).) | |
Equals | (Inherited from Object.) | |
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetResolution | Return the timer resolution. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IsGreedy | Checks if this time limited collector is greedy in collecting the last hit.
A non greedy collector, upon a timeout, would throw a {@link TimeExceededException}
without allowing the wrapped collector to collect current doc. A greedy one would
first allow the wrapped hit collector to collect current doc and only then
throw a {@link TimeExceededException}.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
SetGreedy | Sets whether this time limited collector is greedy. | |
SetNextReader | (Overrides Collector..::..SetNextReader(IndexReader, Int32).) | |
SetResolution | Set the timer resolution.
The default timer resolution is 20 milliseconds.
This means that a search required to take no longer than
800 milliseconds may be stopped after 780 to 820 milliseconds.
Note that:
| |
SetScorer | (Overrides Collector..::..SetScorer(Scorer).) | |
ToString | (Inherited from Object.) |
Fields
Name | Description | |
---|---|---|
DEFAULT_GREEDY | Default for {@link #IsGreedy()}. | |
DEFAULT_RESOLUTION | Default timer resolution. |