mirror of https://github.com/apache/lucene.git
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:
parent
74c9b8887f
commit
56c2994f66
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue