Class AddIndexesTask
Adds an input index to an existing index, using Lucene.Net.Index.IndexWriter.AddIndexes(params Lucene.Net.Store.Directory[]) or Lucene.Net.Index.IndexWriter.AddIndexes(params Lucene.Net.Index.IndexReader[]). The location of the input index is specified by the parameter ADDINDEXES_INPUT_DIR and is assumed to be a directory on the file system.
Takes optional parameter useAddIndexesDir which specifies which AddIndexes variant to use (defaults totrue
, to use AddIndexes(Directory)
).
Implements
Inherited Members
Namespace: Lucene.Net.Benchmarks.ByTask.Tasks
Assembly: Lucene.Net.Benchmark.dll
Syntax
public class AddIndexesTask : PerfTask, IDisposable
Constructors
AddIndexesTask(PerfRunData)
Adds an input index to an existing index, using Lucene.Net.Index.IndexWriter.AddIndexes(params Lucene.Net.Store.Directory[]) or Lucene.Net.Index.IndexWriter.AddIndexes(params Lucene.Net.Index.IndexReader[]). The location of the input index is specified by the parameter ADDINDEXES_INPUT_DIR and is assumed to be a directory on the file system.
Takes optional parameter useAddIndexesDir which specifies which AddIndexes variant to use (defaults totrue
, to use AddIndexes(Directory)
).
Declaration
public AddIndexesTask(PerfRunData runData)
Parameters
Type | Name | Description |
---|---|---|
PerfRunData | runData |
Fields
ADDINDEXES_INPUT_DIR
Adds an input index to an existing index, using Lucene.Net.Index.IndexWriter.AddIndexes(params Lucene.Net.Store.Directory[]) or Lucene.Net.Index.IndexWriter.AddIndexes(params Lucene.Net.Index.IndexReader[]). The location of the input index is specified by the parameter ADDINDEXES_INPUT_DIR and is assumed to be a directory on the file system.
Takes optional parameter useAddIndexesDir which specifies which AddIndexes variant to use (defaults totrue
, to use AddIndexes(Directory)
).
Declaration
public static readonly string ADDINDEXES_INPUT_DIR
Field Value
Type | Description |
---|---|
string |
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)
Releases resources used by the AddIndexesTask and if overridden in a derived class, optionally releases unmanaged resources.
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 (useAddIndexesDir only)
Declaration
public override void SetParams(string @params)
Parameters
Type | Name | Description |
---|---|---|
string | params |
|
Overrides
Setup()
Task setup work that should not be measured for that specific task. By default it does nothing, but tasks can implement this, moving work from DoLogic() to this method. Only the work done in DoLogic() is measured for this task. Notice that higher level (sequence) tasks containing this task would then measure larger time than the sum of their contained tasks.
Declaration
public override void Setup()
Overrides
TearDown()
Task teardown work that should not be measured for that specific task. By
default it does nothing, but tasks can implement this, moving work from
DoLogic() to this method. Only the work done in DoLogic()
is measured for this task. Notice that higher level (sequence) tasks
containing this task would then measure larger time than the sum of their
contained tasks.
Declaration
public override void TearDown()