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
digester, groupLocalService, props
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
addDocument
(String documentType, com.liferay.portal.kernel.search.SearchContext searchContext, com.liferay.portal.kernel.search.Document document) protected abstract void
addDocuments
(String documentType, com.liferay.portal.kernel.search.SearchContext searchContext, Collection<com.liferay.portal.kernel.search.Document> documents) protected void
addNGramFields
(com.liferay.portal.kernel.search.Document document, Map<String, String> nGrams) protected com.liferay.portal.kernel.search.Document
protected com.liferay.portal.kernel.search.Document
createDocument
(long companyId, long groupId, String languageId, String keywords, float weight, String keywordFieldName, String typeFieldValue, int maxNGramLength) protected com.liferay.portal.kernel.search.suggest.NGramHolderBuilder
protected void
indexKeyword
(com.liferay.portal.kernel.search.SearchContext searchContext, long groupId, String languageId, String keyword, float weight, String keywordFieldName, String typeFieldValue, int maxNGramLength) protected void
indexKeywords
(com.liferay.portal.kernel.search.SearchContext searchContext, long groupId, String languageId, InputStream inputStream, String keywordFieldName, String typeFieldValue, int maxNGramLength) void
setBatchSize
(int batchSize) void
setDocumentPrototype
(com.liferay.portal.kernel.search.Document documentPrototype) Methods inherited from class com.liferay.portal.search.suggest.BaseSpellCheckIndexWriter
getDigester, getResource, getSupportedLocales, 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 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:
indexKeyword
in 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:
indexKeywords
in classBaseSpellCheckIndexWriter
- Throws:
Exception
-