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

public abstract class BaseGenericSpellCheckIndexWriter extends BaseSpellCheckIndexWriter
  • 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

      protected void addNGramFields(com.liferay.portal.kernel.search.Document document, Map<String,String> nGrams)
    • 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 class BaseSpellCheckIndexWriter
      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 class BaseSpellCheckIndexWriter
      Throws:
      Exception