Search in sources :

Example 26 with PerfRunData

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;
}
Also used : DirectoryTaxonomyWriter(org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter) PerfRunData(org.apache.lucene.benchmark.byTask.PerfRunData)

Example 27 with PerfRunData

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;
}
Also used : DirectoryTaxonomyWriter(org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter) PerfRunData(org.apache.lucene.benchmark.byTask.PerfRunData)

Example 28 with PerfRunData

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();
}
Also used : PerfRunData(org.apache.lucene.benchmark.byTask.PerfRunData)

Example 29 with PerfRunData

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();
}
Also used : PerfRunData(org.apache.lucene.benchmark.byTask.PerfRunData)

Example 30 with PerfRunData

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();
}
Also used : PerfRunData(org.apache.lucene.benchmark.byTask.PerfRunData)

Aggregations

PerfRunData (org.apache.lucene.benchmark.byTask.PerfRunData)40 Config (org.apache.lucene.benchmark.byTask.utils.Config)13 Path (java.nio.file.Path)12 Properties (java.util.Properties)10 BufferedReader (java.io.BufferedReader)4 AddDocTask (org.apache.lucene.benchmark.byTask.tasks.AddDocTask)3 CloseIndexTask (org.apache.lucene.benchmark.byTask.tasks.CloseIndexTask)3 CreateIndexTask (org.apache.lucene.benchmark.byTask.tasks.CreateIndexTask)3 TaskSequence (org.apache.lucene.benchmark.byTask.tasks.TaskSequence)3 IndexWriterConfig (org.apache.lucene.index.IndexWriterConfig)3 WhitespaceAnalyzer (org.apache.lucene.analysis.core.WhitespaceAnalyzer)2 DirectoryTaxonomyWriter (org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter)2 IndexReader (org.apache.lucene.index.IndexReader)2 IndexWriter (org.apache.lucene.index.IndexWriter)2 Term (org.apache.lucene.index.Term)2 IndexSearcher (org.apache.lucene.search.IndexSearcher)2 TermQuery (org.apache.lucene.search.TermQuery)2 TopDocs (org.apache.lucene.search.TopDocs)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 PrintStream (java.io.PrintStream)1