mirror of https://github.com/apache/lucene.git
LUCENE-5493: fix solr
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene5493@1574969 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a49ce84898
commit
cee0e37635
|
@ -24,6 +24,7 @@ import org.apache.lucene.analysis.Analyzer;
|
|||
import org.apache.lucene.search.suggest.Lookup;
|
||||
import org.apache.lucene.search.suggest.analyzing.AnalyzingInfixSuggester;
|
||||
import org.apache.lucene.search.suggest.analyzing.AnalyzingSuggester;
|
||||
import org.apache.lucene.store.FSDirectory;
|
||||
import org.apache.solr.common.util.NamedList;
|
||||
import org.apache.solr.core.SolrCore;
|
||||
import org.apache.solr.schema.FieldType;
|
||||
|
@ -90,7 +91,8 @@ public class AnalyzingInfixLookupFactory extends LookupFactory {
|
|||
|
||||
try {
|
||||
return new AnalyzingInfixSuggester(core.getSolrConfig().luceneMatchVersion,
|
||||
new File(indexPath), indexAnalyzer, queryAnalyzer, minPrefixChars);
|
||||
FSDirectory.open(new File(indexPath)), indexAnalyzer,
|
||||
queryAnalyzer, minPrefixChars);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
|
|
@ -23,8 +23,9 @@ import java.io.IOException;
|
|||
import org.apache.lucene.analysis.Analyzer;
|
||||
import org.apache.lucene.search.suggest.Lookup;
|
||||
import org.apache.lucene.search.suggest.analyzing.AnalyzingInfixSuggester;
|
||||
import org.apache.lucene.search.suggest.analyzing.BlendedInfixSuggester;
|
||||
import org.apache.lucene.search.suggest.analyzing.BlendedInfixSuggester.BlenderType;
|
||||
import org.apache.lucene.search.suggest.analyzing.BlendedInfixSuggester;
|
||||
import org.apache.lucene.store.FSDirectory;
|
||||
import org.apache.solr.common.util.NamedList;
|
||||
import org.apache.solr.core.SolrCore;
|
||||
import org.apache.solr.schema.FieldType;
|
||||
|
@ -94,7 +95,9 @@ public class BlendedInfixLookupFactory extends AnalyzingInfixLookupFactory {
|
|||
|
||||
try {
|
||||
return new BlendedInfixSuggester(core.getSolrConfig().luceneMatchVersion,
|
||||
new File(indexPath), indexAnalyzer, queryAnalyzer, minPrefixChars, blenderType, numFactor);
|
||||
FSDirectory.open(new File(indexPath)),
|
||||
indexAnalyzer, queryAnalyzer, minPrefixChars,
|
||||
blenderType, numFactor);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue