Method SetBaseline
SetBaseline(Int64)
Sets the baseline for this collector. By default the collectors baseline is initialized once the first reader is passed to the collector. To include operations executed in prior to the actual document collection set the baseline through this method in your prelude.
Example usage:
// Counter is in the Lucene.Net.Util namespace
Counter clock = Counter.NewCounter(true);
long baseline = clock.Get();
// ... prepare search
TimeLimitingCollector collector = new TimeLimitingCollector(c, clock, numTicks);
collector.SetBaseline(baseline);
indexSearcher.Search(query, collector);
Declaration
public virtual void SetBaseline(long clockTime)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | clockTime |
See Also
SetBaseline()
Syntactic sugar for SetBaseline(Int64) using Get() on the clock passed to the constructor.
Declaration
public virtual void SetBaseline()