adding Russian analyzer to index task built-ins now that it has a friendly ctor

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150951 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erik Hatcher 2004-02-22 10:33:38 +00:00
parent 854c344317
commit 3283c40205
1 changed files with 4 additions and 9 deletions

View File

@ -4,6 +4,7 @@ import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.StopAnalyzer;
import org.apache.lucene.analysis.SimpleAnalyzer;
import org.apache.lucene.analysis.WhitespaceAnalyzer;
import org.apache.lucene.analysis.ru.RussianAnalyzer;
import org.apache.lucene.analysis.de.GermanAnalyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.DateField;
@ -260,12 +261,11 @@ public class IndexTask extends Task {
boolean indexIt = true;
if (checkLastModified) {
Hits hits = null;
Term pathTerm =
new Term("path", file.getPath());
TermQuery query =
new TermQuery(pathTerm);
hits = searcher.search(query);
Hits hits = searcher.search(query);
// if document is found, compare the
// indexed last modified time with the
@ -353,12 +353,7 @@ public class IndexTask extends Task {
}
}
/**
* @todo - the RusionAnalyzer requires a constructor argument
* so its being removed from here until a mechanism
* is developed to pass ctor info somehow
*/
public static class AnalyzerType extends EnumeratedAttribute {
public static class AnalyzerType extends EnumeratedAttribute {
private static Map analyzerLookup = new HashMap();
static {
@ -367,7 +362,7 @@ public class IndexTask extends Task {
analyzerLookup.put("stop", StopAnalyzer.class.getName());
analyzerLookup.put("whitespace", WhitespaceAnalyzer.class.getName());
analyzerLookup.put("german", GermanAnalyzer.class.getName());
// analyzerLookup.put("russian", RussianAnalyzer.class.getName());
analyzerLookup.put("russian", RussianAnalyzer.class.getName());
}
/**