com.liferay.portal.search.lucene
Class LuceneSpellCheckIndexWriter
java.lang.Object
com.liferay.portal.kernel.search.BaseSpellCheckIndexWriter
com.liferay.portal.search.lucene.LuceneSpellCheckIndexWriter
- All Implemented Interfaces:
- SpellCheckIndexWriter
public class LuceneSpellCheckIndexWriter
- extends BaseSpellCheckIndexWriter
|
Method Summary |
protected void |
addField(org.apache.lucene.document.Document document,
String fieldName,
String fieldValue,
org.apache.lucene.document.Field.Store fieldStore,
org.apache.lucene.index.FieldInfo.IndexOptions indexOptions,
boolean omitNorms)
|
protected void |
addNGramFields(org.apache.lucene.document.Document document,
Map<String,String> nGrams)
|
void |
clearQuerySuggestionDictionaryIndexes(SearchContext searchContext)
|
void |
clearSpellCheckerDictionaryIndexes(SearchContext searchContext)
|
protected org.apache.lucene.document.Document |
createDocument(long companyId,
long groupId,
String languageId,
String localizedFieldName,
String word,
float weight,
String typeFieldValue,
int maxNGramLength)
|
protected void |
indexKeyword(SearchContext searchContext,
long groupId,
String languageId,
String keyword,
float weight,
String keywordFieldName,
String typeFieldValue,
int maxNGramLength)
|
protected void |
indexKeywords(SearchContext searchContext,
long groupId,
String languageId,
InputStream inputStream,
String keywordFieldName,
String typeFieldValue,
int maxNGramLength)
|
protected boolean |
isValidWord(String localizedFieldName,
String word,
List<org.apache.lucene.index.IndexReader> indexReaders)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LuceneSpellCheckIndexWriter
public LuceneSpellCheckIndexWriter()
clearQuerySuggestionDictionaryIndexes
public void clearQuerySuggestionDictionaryIndexes(SearchContext searchContext)
throws SearchException
- Throws:
SearchException
clearSpellCheckerDictionaryIndexes
public void clearSpellCheckerDictionaryIndexes(SearchContext searchContext)
throws SearchException
- Throws:
SearchException
addField
protected void addField(org.apache.lucene.document.Document document,
String fieldName,
String fieldValue,
org.apache.lucene.document.Field.Store fieldStore,
org.apache.lucene.index.FieldInfo.IndexOptions indexOptions,
boolean omitNorms)
addNGramFields
protected void addNGramFields(org.apache.lucene.document.Document document,
Map<String,String> nGrams)
createDocument
protected org.apache.lucene.document.Document createDocument(long companyId,
long groupId,
String languageId,
String localizedFieldName,
String word,
float weight,
String typeFieldValue,
int maxNGramLength)
throws SearchException
- Throws:
SearchException
indexKeyword
protected void indexKeyword(SearchContext searchContext,
long groupId,
String languageId,
String keyword,
float weight,
String keywordFieldName,
String typeFieldValue,
int maxNGramLength)
throws Exception
- Specified by:
indexKeyword in class BaseSpellCheckIndexWriter
- Throws:
Exception
indexKeywords
protected void indexKeywords(SearchContext searchContext,
long groupId,
String languageId,
InputStream inputStream,
String keywordFieldName,
String typeFieldValue,
int maxNGramLength)
throws Exception
- Specified by:
indexKeywords in class BaseSpellCheckIndexWriter
- Throws:
Exception
isValidWord
protected boolean isValidWord(String localizedFieldName,
String word,
List<org.apache.lucene.index.IndexReader> indexReaders)
throws IOException
- Throws:
IOException