Class SuggestHelper
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.index.lucene.util.SuggestHelper
-
public class SuggestHelper extends java.lang.Object
Helper class for getting suggest results for a given term, calling aLookup
implementation under the hood.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SuggestHelper.SuggestQuery
-
Constructor Summary
Constructors Constructor Description SuggestHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Analyzer
getAnalyzer()
static AnalyzingInfixSuggester
getLookup(Directory suggestDirectory)
static AnalyzingInfixSuggester
getLookup(Directory suggestDirectory, Analyzer analyzer)
static AnalyzingInfixSuggester
getLookup(Directory suggestDirectory, Analyzer analyzer, java.io.File tempDir)
static java.util.List<Lookup.LookupResult>
getSuggestions(AnalyzingInfixSuggester suggester, @Nullable SuggestHelper.SuggestQuery suggestQuery)
static SuggestHelper.SuggestQuery
getSuggestQuery(java.lang.String suggestQueryString)
static void
updateSuggester(Directory directory, Analyzer analyzer, IndexReader reader, Closer closer)
-
-
-
Method Detail
-
updateSuggester
public static void updateSuggester(Directory directory, Analyzer analyzer, IndexReader reader, Closer closer) throws java.io.IOException
- Throws:
java.io.IOException
-
getSuggestions
public static java.util.List<Lookup.LookupResult> getSuggestions(AnalyzingInfixSuggester suggester, @Nullable @Nullable SuggestHelper.SuggestQuery suggestQuery)
-
getSuggestQuery
public static SuggestHelper.SuggestQuery getSuggestQuery(java.lang.String suggestQueryString)
-
getLookup
public static AnalyzingInfixSuggester getLookup(Directory suggestDirectory) throws java.io.IOException
- Throws:
java.io.IOException
-
getLookup
public static AnalyzingInfixSuggester getLookup(Directory suggestDirectory, Analyzer analyzer) throws java.io.IOException
- Throws:
java.io.IOException
-
getLookup
public static AnalyzingInfixSuggester getLookup(Directory suggestDirectory, Analyzer analyzer, java.io.File tempDir) throws java.io.IOException
- Throws:
java.io.IOException
-
getAnalyzer
public static Analyzer getAnalyzer()
-
-