use of org.apache.lucene.benchmark.byTask.PerfRunData in project lucene-solr by apache.
the class OpenTaxonomyIndexTask method doLogic.
@Override
public int doLogic() throws IOException {
PerfRunData runData = getRunData();
runData.setTaxonomyWriter(new DirectoryTaxonomyWriter(runData.getTaxonomyDir()));
return 1;
}
use of org.apache.lucene.benchmark.byTask.PerfRunData in project lucene-solr by apache.
the class CreateTaxonomyIndexTask method doLogic.
@Override
public int doLogic() throws IOException {
PerfRunData runData = getRunData();
runData.setTaxonomyWriter(new DirectoryTaxonomyWriter(runData.getTaxonomyDir(), OpenMode.CREATE));
return 1;
}
use of org.apache.lucene.benchmark.byTask.PerfRunData in project lucene-solr by apache.
the class AddIndexesTaskTest method testAddIndexesDir.
public void testAddIndexesDir() throws Exception {
PerfRunData runData = createPerfRunData();
// create the target index first
new CreateIndexTask(runData).doLogic();
AddIndexesTask task = new AddIndexesTask(runData);
task.setup();
// add the input index
task.setParams("true");
task.doLogic();
// close the index
new CloseIndexTask(runData).doLogic();
assertIndex(runData);
runData.close();
}
use of org.apache.lucene.benchmark.byTask.PerfRunData in project lucene-solr by apache.
the class AddIndexesTaskTest method testAddIndexesReader.
public void testAddIndexesReader() throws Exception {
PerfRunData runData = createPerfRunData();
// create the target index first
new CreateIndexTask(runData).doLogic();
AddIndexesTask task = new AddIndexesTask(runData);
task.setup();
// add the input index
task.setParams("false");
task.doLogic();
// close the index
new CloseIndexTask(runData).doLogic();
assertIndex(runData);
runData.close();
}
use of org.apache.lucene.benchmark.byTask.PerfRunData in project lucene-solr by apache.
the class AddIndexesTaskTest method testAddIndexesDefault.
public void testAddIndexesDefault() throws Exception {
PerfRunData runData = createPerfRunData();
// create the target index first
new CreateIndexTask(runData).doLogic();
AddIndexesTask task = new AddIndexesTask(runData);
task.setup();
// add the input index
task.doLogic();
// close the index
new CloseIndexTask(runData).doLogic();
assertIndex(runData);
runData.close();
}
Aggregations