Liferay 6.2.0-ce-b2

com.liferay.portal.search.lucene
Class LuceneSpellCheckIndexWriter

java.lang.Object
  extended by com.liferay.portal.kernel.search.BaseSpellCheckIndexWriter
      extended by com.liferay.portal.search.lucene.LuceneSpellCheckIndexWriter
All Implemented Interfaces:
SpellCheckIndexWriter

public class LuceneSpellCheckIndexWriter
extends BaseSpellCheckIndexWriter


Field Summary
 
Fields inherited from class com.liferay.portal.kernel.search.BaseSpellCheckIndexWriter
QUERY_SUGGESTION_TYPE, SPELL_CHECKER_TYPE
 
Constructor Summary
LuceneSpellCheckIndexWriter()
           
 
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 indexKeywords(long companyId, 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 com.liferay.portal.kernel.search.BaseSpellCheckIndexWriter
getResource, getUID, indexKeywords, indexKeywords, indexQuerySuggestionDictionaries, indexQuerySuggestionDictionary, indexSpellCheckerDictionaries, indexSpellCheckerDictionary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuceneSpellCheckIndexWriter

public LuceneSpellCheckIndexWriter()
Method Detail

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

indexKeywords

protected void indexKeywords(long companyId,
                             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

Liferay 6.2.0-ce-b2