C# Class Lucene.Net.Search.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 TimeExceededException.
Inheritance: Collector
Exibir arquivo Open project: synhershko/lucene.net Class Usage Examples

Public Properties

Property Type Description
DEFAULT_GREEDY bool

Public Methods

Method Description
Collect ( int doc ) : void

Calls Collector.Collect(int) on the decorated Collector unless the allowed time has passed, in which case it throws an exception.

if the time allowed has exceeded.

SetNextReader ( Lucene.Net.Index.IndexReader reader, int base_Renamed ) : void
SetScorer ( Lucene.Net.Search.Scorer scorer ) : void
TimeLimitingCollector ( Collector collector, long timeAllowed ) : System

Create a TimeLimitedCollector wrapper over another Collector with a specified timeout.

Private Methods

Method Description
InitBlock ( ) : void
TimeLimitingCollector ( ) : System

Method Details

Collect() public method

Calls Collector.Collect(int) on the decorated Collector unless the allowed time has passed, in which case it throws an exception. if the time allowed has exceeded.
public Collect ( int doc ) : void
doc int
return void

SetNextReader() public method

public SetNextReader ( Lucene.Net.Index.IndexReader reader, int base_Renamed ) : void
reader Lucene.Net.Index.IndexReader
base_Renamed int
return void

SetScorer() public method

public SetScorer ( Lucene.Net.Search.Scorer scorer ) : void
scorer Lucene.Net.Search.Scorer
return void

TimeLimitingCollector() public method

Create a TimeLimitedCollector wrapper over another Collector with a specified timeout.
public TimeLimitingCollector ( Collector collector, long timeAllowed ) : System
collector Collector the wrapped ///
timeAllowed long max time allowed for collecting hits after which is thrown ///
return System

Property Details

DEFAULT_GREEDY public_oe property

Default for IsGreedy().
public bool DEFAULT_GREEDY
return bool