Added a special case for looking up KeywordAnalyzer, which alone among analyzers occupies package o.a.l.analysis.core.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1087431 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Steven Rowe 2011-03-31 20:16:10 +00:00
parent 74c9b8887f
commit 56c2994f66
1 changed files with 7 additions and 8 deletions

View File

@ -54,17 +54,16 @@ public class NewAnalyzerTask extends PerfTask {
public int doLogic() throws IOException {
String className = null;
try {
if (current >= analyzerClassNames.size())
{
if (current >= analyzerClassNames.size()) {
current = 0;
}
className = analyzerClassNames.get(current++);
if (className == null || className.equals(""))
{
className = "org.apache.lucene.analysis.standard.StandardAnalyzer";
}
if (className.indexOf(".") == -1 || className.startsWith("standard."))//there is no package name, assume o.a.l.analysis
{
if (className == null || className.equals("")) {
className = "org.apache.lucene.analysis.standard.StandardAnalyzer";
} else if (className.equals("KeywordAnalyzer")) {
className = "org.apache.lucene.analysis.core.KeywordAnalyzer";
} else if (className.indexOf(".") == -1 || className.startsWith("standard.")) {
//there is no package name, assume o.a.l.analysis
className = "org.apache.lucene.analysis." + className;
}
getRunData().setAnalyzer(createAnalyzer(className));