Liferay 7.0-ce-b4

com.liferay.portal.kernel.search.suggest
Class BaseGenericSpellCheckIndexWriter

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

public abstract class BaseGenericSpellCheckIndexWriter
extends BaseSpellCheckIndexWriter


Constructor Summary
BaseGenericSpellCheckIndexWriter()
           
 
Method Summary
protected abstract  void addDocument(String documentType, SearchContext searchContext, Document document)
           
protected abstract  void addDocuments(String documentType, SearchContext searchContext, Collection<Document> documents)
           
protected  void addNGramFields(Document document, Map<String,String> nGrams)
           
protected  Document createDocument()
           
protected  Document createDocument(long companyId, long groupId, String languageId, String keywords, float weight, String keywordFieldName, 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)
           
 void setBatchSize(int batchSize)
           
 void setDocumentPrototype(Document documentPrototype)
           
 
Methods inherited from class com.liferay.portal.kernel.search.suggest.BaseSpellCheckIndexWriter
getResource, getUID, indexKeyword, indexKeywords, indexKeywords, indexQuerySuggestionDictionaries, indexQuerySuggestionDictionary, indexSpellCheckerDictionaries, indexSpellCheckerDictionary, setQuerySuggestionMaxNGramLength
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.liferay.portal.kernel.search.suggest.SpellCheckIndexWriter
clearQuerySuggestionDictionaryIndexes, clearSpellCheckerDictionaryIndexes
 

Constructor Detail

BaseGenericSpellCheckIndexWriter

public BaseGenericSpellCheckIndexWriter()
Method Detail

setBatchSize

public void setBatchSize(int batchSize)

setDocumentPrototype

public void setDocumentPrototype(Document documentPrototype)

addDocument

protected abstract void addDocument(String documentType,
                                    SearchContext searchContext,
                                    Document document)
                             throws SearchException
Throws:
SearchException

addDocuments

protected abstract void addDocuments(String documentType,
                                     SearchContext searchContext,
                                     Collection<Document> documents)
                              throws SearchException
Throws:
SearchException

addNGramFields

protected void addNGramFields(Document document,
                              Map<String,String> nGrams)

createDocument

protected Document createDocument()

createDocument

protected Document createDocument(long companyId,
                                  long groupId,
                                  String languageId,
                                  String keywords,
                                  float weight,
                                  String keywordFieldName,
                                  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

Liferay 7.0-ce-b4