mirror of https://github.com/apache/lucene.git
Removed call to SolrCore.log and SolrCore import.
Replaced reference to java.io.File with File git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@680936 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4ac6ce3190
commit
842680f15d
|
@ -21,14 +21,12 @@ import org.apache.lucene.analysis.Token;
|
||||||
import org.apache.lucene.analysis.TokenStream;
|
import org.apache.lucene.analysis.TokenStream;
|
||||||
import org.apache.solr.common.ResourceLoader;
|
import org.apache.solr.common.ResourceLoader;
|
||||||
import org.apache.solr.common.util.StrUtils;
|
import org.apache.solr.common.util.StrUtils;
|
||||||
import org.apache.solr.core.SolrCore;
|
|
||||||
import org.apache.solr.util.plugin.ResourceLoaderAware;
|
import org.apache.solr.util.plugin.ResourceLoaderAware;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.io.File;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -53,7 +51,7 @@ public class SynonymFilterFactory extends BaseTokenFilterFactory implements Reso
|
||||||
if (synonyms != null) {
|
if (synonyms != null) {
|
||||||
List<String> wlist=null;
|
List<String> wlist=null;
|
||||||
try {
|
try {
|
||||||
File synonymFile = new java.io.File(synonyms);
|
File synonymFile = new File(synonyms);
|
||||||
if (synonymFile.exists()) {
|
if (synonymFile.exists()) {
|
||||||
wlist = loader.getLines(synonyms);
|
wlist = loader.getLines(synonyms);
|
||||||
} else {
|
} else {
|
||||||
|
@ -67,9 +65,6 @@ public class SynonymFilterFactory extends BaseTokenFilterFactory implements Reso
|
||||||
}
|
}
|
||||||
synMap = new SynonymMap(ignoreCase);
|
synMap = new SynonymMap(ignoreCase);
|
||||||
parseRules(wlist, synMap, "=>", ",", expand,tokFactory);
|
parseRules(wlist, synMap, "=>", ",", expand,tokFactory);
|
||||||
if (wlist.size()<=20) {
|
|
||||||
SolrCore.log.fine("SynonymMap "+synonyms +":"+synMap);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue