LUCENE-3020: don't reflect mockanalyzer, it has no no-arg ctor anymore

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1091159 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2011-04-11 18:15:50 +00:00
parent e483e260d2
commit 52b54262dc
3 changed files with 11 additions and 9 deletions

View File

@ -407,7 +407,7 @@ public class TestPerfTasksLogic extends BenchmarkTestCase {
// Index the line docs
String algLines2[] = {
"# ----- properties ",
"analyzer=org.apache.lucene.analysis.MockAnalyzer",
"analyzer=org.apache.lucene.analysis.core.WhitespaceAnalyzer",
"content.source=org.apache.lucene.benchmark.byTask.feeds.LineDocSource",
"docs.file=" + lineFile.getAbsolutePath().replace('\\', '/'),
"content.source.forever=false",
@ -448,7 +448,7 @@ public class TestPerfTasksLogic extends BenchmarkTestCase {
// then build index from the same docs
String algLines1[] = {
"# ----- properties ",
"analyzer=org.apache.lucene.analysis.MockAnalyzer",
"analyzer=org.apache.lucene.analysis.core.WhitespaceAnalyzer",
"content.source=org.apache.lucene.benchmark.byTask.feeds.LineDocSource",
"docs.file=" + getReuters20LinesFile(),
"# ----- alg ",
@ -1021,18 +1021,18 @@ public class TestPerfTasksLogic extends BenchmarkTestCase {
"two three four", "three four",
"three four five", "four five",
"four five six", "five six" });
// MockAnalyzer, default maxShingleSize and outputUnigrams
// WhitespaceAnalyzer, default maxShingleSize and outputUnigrams
benchmark = execBenchmark
(getShingleConfig("analyzer:MockAnalyzer"));
(getShingleConfig("analyzer:WhitespaceAnalyzer"));
assertEqualShingle(benchmark.getRunData().getAnalyzer(), text,
new String[] { "one,two,three,", "one,two,three, four",
"four", "four five", "five", "five six",
"six" });
// MockAnalyzer, maxShingleSize=3 and outputUnigrams=false
// WhitespaceAnalyzer, maxShingleSize=3 and outputUnigrams=false
benchmark = execBenchmark
(getShingleConfig
("outputUnigrams:false,maxShingleSize:3,analyzer:MockAnalyzer"));
("outputUnigrams:false,maxShingleSize:3,analyzer:WhitespaceAnalyzer"));
assertEqualShingle(benchmark.getRunData().getAnalyzer(), text,
new String[] { "one,two,three, four",
"one,two,three, four five",

View File

@ -21,6 +21,7 @@ import java.io.IOException;
import java.util.Properties;
import org.apache.lucene.analysis.MockAnalyzer;
import org.apache.lucene.analysis.core.WhitespaceAnalyzer;
import org.apache.lucene.benchmark.BenchmarkTestCase;
import org.apache.lucene.benchmark.byTask.PerfRunData;
import org.apache.lucene.benchmark.byTask.tasks.AddDocTask;
@ -70,7 +71,7 @@ public class DocMakerTest extends BenchmarkTestCase {
Properties props = new Properties();
// Indexing configuration.
props.setProperty("analyzer", MockAnalyzer.class.getName());
props.setProperty("analyzer", WhitespaceAnalyzer.class.getName());
props.setProperty("content.source", OneDocSource.class.getName());
props.setProperty("directory", "RAMDirectory");
if (setIndexProps) {
@ -99,7 +100,7 @@ public class DocMakerTest extends BenchmarkTestCase {
Properties props = new Properties();
// Indexing configuration.
props.setProperty("analyzer", MockAnalyzer.class.getName());
props.setProperty("analyzer", WhitespaceAnalyzer.class.getName());
props.setProperty("content.source", OneDocSource.class.getName());
props.setProperty("directory", "RAMDirectory");
if (setNormsProp) {

View File

@ -27,6 +27,7 @@ import java.util.Properties;
import org.apache.commons.compress.compressors.CompressorStreamFactory;
import org.apache.lucene.analysis.MockAnalyzer;
import org.apache.lucene.analysis.core.WhitespaceAnalyzer;
import org.apache.lucene.benchmark.BenchmarkTestCase;
import org.apache.lucene.benchmark.byTask.PerfRunData;
import org.apache.lucene.benchmark.byTask.feeds.LineDocSource.HeaderLineParser;
@ -121,7 +122,7 @@ public class LineDocSourceTest extends BenchmarkTestCase {
}
// Indexing configuration.
props.setProperty("analyzer", MockAnalyzer.class.getName());
props.setProperty("analyzer", WhitespaceAnalyzer.class.getName());
props.setProperty("content.source", LineDocSource.class.getName());
props.setProperty("directory", "RAMDirectory");
props.setProperty("doc.stored", "true");