Class BaseGenericSpellCheckIndexWriter
java.lang.Object
com.liferay.portal.search.suggest.BaseSpellCheckIndexWriter
com.liferay.portal.search.suggest.BaseGenericSpellCheckIndexWriter
- All Implemented Interfaces:
com.liferay.portal.kernel.search.suggest.SpellCheckIndexWriter
-
Field Summary
Fields inherited from class com.liferay.portal.search.suggest.BaseSpellCheckIndexWriter
groupLocalService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidaddDocument(String documentType, com.liferay.portal.kernel.search.SearchContext searchContext, com.liferay.portal.kernel.search.Document document) protected abstract voidaddDocuments(String documentType, com.liferay.portal.kernel.search.SearchContext searchContext, Collection<com.liferay.portal.kernel.search.Document> documents) protected voidaddNGramFields(com.liferay.portal.kernel.search.Document document, Map<String, String> nGrams) protected com.liferay.portal.kernel.search.Documentprotected com.liferay.portal.kernel.search.DocumentcreateDocument(long companyId, long groupId, String languageId, String keywords, float weight, String keywordFieldName, String typeFieldValue, int maxNGramLength) protected com.liferay.portal.kernel.search.suggest.NGramHolderBuilderprotected voidindexKeyword(com.liferay.portal.kernel.search.SearchContext searchContext, long groupId, String languageId, String keyword, float weight, String keywordFieldName, String typeFieldValue, int maxNGramLength) protected voidindexKeywords(com.liferay.portal.kernel.search.SearchContext searchContext, long groupId, String languageId, InputStream inputStream, String keywordFieldName, String typeFieldValue, int maxNGramLength) voidsetBatchSize(int batchSize) voidsetDocumentPrototype(com.liferay.portal.kernel.search.Document documentPrototype) Methods inherited from class com.liferay.portal.search.suggest.BaseSpellCheckIndexWriter
getResource, getSupportedLocales, getUID, indexKeyword, indexKeywords, indexKeywords, indexQuerySuggestionDictionaries, indexQuerySuggestionDictionary, indexSpellCheckerDictionaries, indexSpellCheckerDictionary, setQuerySuggestionMaxNGramLengthMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.liferay.portal.kernel.search.suggest.SpellCheckIndexWriter
clearQuerySuggestionDictionaryIndexes, clearSpellCheckerDictionaryIndexes
-
Constructor Details
-
BaseGenericSpellCheckIndexWriter
public BaseGenericSpellCheckIndexWriter()
-
-
Method Details
-
setBatchSize
public void setBatchSize(int batchSize) -
setDocumentPrototype
public void setDocumentPrototype(com.liferay.portal.kernel.search.Document documentPrototype) -
addDocument
protected abstract void addDocument(String documentType, com.liferay.portal.kernel.search.SearchContext searchContext, com.liferay.portal.kernel.search.Document document) throws com.liferay.portal.kernel.search.SearchException - Throws:
com.liferay.portal.kernel.search.SearchException
-
addDocuments
protected abstract void addDocuments(String documentType, com.liferay.portal.kernel.search.SearchContext searchContext, Collection<com.liferay.portal.kernel.search.Document> documents) throws com.liferay.portal.kernel.search.SearchException - Throws:
com.liferay.portal.kernel.search.SearchException
-
addNGramFields
-
createDocument
protected com.liferay.portal.kernel.search.Document createDocument() -
createDocument
protected com.liferay.portal.kernel.search.Document createDocument(long companyId, long groupId, String languageId, String keywords, float weight, String keywordFieldName, String typeFieldValue, int maxNGramLength) throws com.liferay.portal.kernel.search.SearchException - Throws:
com.liferay.portal.kernel.search.SearchException
-
getNGramHolderBuilder
protected com.liferay.portal.kernel.search.suggest.NGramHolderBuilder getNGramHolderBuilder() -
indexKeyword
protected void indexKeyword(com.liferay.portal.kernel.search.SearchContext searchContext, long groupId, String languageId, String keyword, float weight, String keywordFieldName, String typeFieldValue, int maxNGramLength) throws Exception - Specified by:
indexKeywordin classBaseSpellCheckIndexWriter- Throws:
Exception
-
indexKeywords
protected void indexKeywords(com.liferay.portal.kernel.search.SearchContext searchContext, long groupId, String languageId, InputStream inputStream, String keywordFieldName, String typeFieldValue, int maxNGramLength) throws Exception - Specified by:
indexKeywordsin classBaseSpellCheckIndexWriter- Throws:
Exception
-