|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eaglei.search.provider.lucene.suggest.LuceneAutoSuggestProvider
public class LuceneAutoSuggestProvider
Clients of this class must create and populate the Lucene Directory according to the schema in LuceneAutoSuggestIndexSchema before using this provider.
| Field Summary | |
|---|---|
static float |
DEFAULT_SCORE_THRESHHOLD
Default score threshold |
static int |
MAX_FRAGMENTS
Max number of fragments for highlighting |
| Fields inherited from interface org.eaglei.search.provider.lucene.suggest.LuceneAutoSuggestIndexSchema |
|---|
INSTITUTION_FIELD, IS_INSTANCE_FIELD, IS_VALUE_OF_FIELD, LABEL_FIELD, PREF_LABEL_FIELD, ROOT_TYPE_FIELD, TYPE_FIELD, URI_FIELD |
| Constructor Summary | |
|---|---|
LuceneAutoSuggestProvider(org.apache.lucene.analysis.Analyzer queryAnalyzer,
org.apache.lucene.analysis.Analyzer indexAnalyzer,
org.apache.lucene.store.Directory directory)
Creates a new ModelEntityExtractor. |
|
LuceneAutoSuggestProvider(org.apache.lucene.analysis.Analyzer analyzer,
org.apache.lucene.store.Directory directory)
Creates a new ModelEntityExtractor that uses the same analyzer for indexing and querying. |
|
| Method Summary | |
|---|---|
void |
setFuzzyRewrite(boolean fuzzyRewrite)
Sets the flag that controls whether the original query is rewritten to a "fuzzy" form (levenstein edit distance) if the original execution fails to retrieve results. |
void |
setScoreThreshold(float threshold)
Sets the Lucene score threshold. |
java.util.List<org.eaglei.lexical.EntityMatch> |
suggest(org.eaglei.lexical.EntityMatchRequest request)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final float DEFAULT_SCORE_THRESHHOLD
public static final int MAX_FRAGMENTS
| Constructor Detail |
|---|
public LuceneAutoSuggestProvider(org.apache.lucene.analysis.Analyzer analyzer,
org.apache.lucene.store.Directory directory)
throws java.io.IOException
analyzer - Analyzer used for both querying and indexingdirectory - Lucene directory. This directory should already contain a valid index populated according to
the schema in LuceneIndexer.
java.io.IOException - Thrown if there is an error building the index.
public LuceneAutoSuggestProvider(org.apache.lucene.analysis.Analyzer queryAnalyzer,
org.apache.lucene.analysis.Analyzer indexAnalyzer,
org.apache.lucene.store.Directory directory)
throws java.io.IOException
queryAnalyzer - Analyzer to use for query execution.indexAnalyzer - Analyzer to use for index creation.directory - Lucene directory. This directory should already contain a valid index populated according to
the schema in LuceneIndexer.
java.io.IOException - Thrown if there is an error building the index.| Method Detail |
|---|
public void setFuzzyRewrite(boolean fuzzyRewrite)
fuzzyRewrite - True for fuzzy rewrite.public void setScoreThreshold(float threshold)
threshold - The threshold.
public java.util.List<org.eaglei.lexical.EntityMatch> suggest(org.eaglei.lexical.EntityMatchRequest request)
throws java.io.IOException
suggest in interface org.eaglei.lexical.SuggestionProviderrequest -
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||