Class NearRealtimeReaderTask
Spawns a BG thread that periodically (defaults to 3.0 seconds, but accepts param in seconds) wakes up and asks IndexWriter for a near real-time reader. Then runs a single query (body: 1) sorted by docdate, and prints time to reopen and time to run the search.
Note
This API is experimental and might change in incompatible ways in the next release.
Implements
Inherited Members
Namespace: Lucene.Net.Benchmarks.ByTask.Tasks
Assembly: Lucene.Net.Benchmark.dll
Syntax
public class NearRealtimeReaderTask : PerfTask, IDisposable
Constructors
NearRealtimeReaderTask(PerfRunData)
Spawns a BG thread that periodically (defaults to 3.0 seconds, but accepts param in seconds) wakes up and asks IndexWriter for a near real-time reader. Then runs a single query (body: 1) sorted by docdate, and prints time to reopen and time to run the search.
Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public NearRealtimeReaderTask(PerfRunData runData)
Parameters
| Type | Name | Description |
|---|---|---|
| PerfRunData | runData |
Properties
SupportsParams
Sub classes that support parameters must override this method to return
true if this task supports command line params.
Declaration
public override bool SupportsParams { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
Methods
Dispose(bool)
Spawns a BG thread that periodically (defaults to 3.0 seconds, but accepts param in seconds) wakes up and asks IndexWriter for a near real-time reader. Then runs a single query (body: 1) sorted by docdate, and prints time to reopen and time to run the search.
Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
Overrides
DoLogic()
Perform the task once (ignoring repetitions specification). Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.
Declaration
public override int DoLogic()
Returns
| Type | Description |
|---|---|
| int | Number of work items done by this task. |
Overrides
SetParams(string)
Set the params of this task.
Declaration
public override void SetParams(string @params)
Parameters
| Type | Name | Description |
|---|---|---|
| string | params |
Overrides
Exceptions
| Type | Condition |
|---|---|
| NotSupportedException | For tasks supporting command line parameters. |