Class TimeLimitingCollector
The TimeLimitingCollector is used to timeout search requests that take longer than the maximum allowed search time limit. After this time is exceeded, the search thread is stopped by throwing a TimeLimitingCollector.TimeExceededException.
Namespace:
Assembly: Lucene.Net.NetCore.dll
Syntax
public class TimeLimitingCollector : Collector
Constructors
Name | Description |
---|---|
TimeLimitingCollector(Collector, Int64) | Create a TimeLimitedCollector wrapper over another Collector with a specified timeout. |
Fields
Name | Description |
---|---|
DEFAULT_GREEDY | Default for IsGreedy. |
DEFAULT_RESOLUTION | Default timer resolution. |
Properties
Name | Description |
---|---|
AcceptsDocsOutOfOrder | |
IsGreedy | Checks if this time limited collector is greedy in collecting the last hit. A non greedy collector, upon a timeout, would throw a TimeLimitingCollector.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 TimeLimitingCollector.TimeExceededException. |
Resolution | Gets or sets 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.
|
Methods
Name | Description |
---|---|
Collect(Int32) | Calls Collect(Int32) on the decorated Collector unless the allowed time has passed, in which case it throws an exception. |
SetNextReader(IndexReader, Int32) | |
SetScorer(Scorer) |