Class CompoundQuerySuggester

java.lang.Object
de.cxp.ocs.smartsuggest.querysuggester.CompoundQuerySuggester
All Implemented Interfaces:
QuerySuggester, AutoCloseable, org.apache.lucene.util.Accountable

public class CompoundQuerySuggester extends Object implements QuerySuggester, org.apache.lucene.util.Accountable
  • Constructor Details

  • Method Details

    • suggest

      public List<Suggestion> suggest(String term, int maxResults, Set<String> tags) throws SuggestException
      Specified by:
      suggest in interface QuerySuggester
      Parameters:
      term - the term for which to get suggestions
      maxResults - the maximum number of suggestions to return
      tags - the group names used for filtering
      Returns:
      A list of suggestions for the given term
      Throws:
      SuggestException
    • isReady

      public boolean isReady()
      Specified by:
      isReady in interface QuerySuggester
      Returns:
      true if ready to serve suggestions
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception
    • ramBytesUsed

      public long ramBytesUsed()
      Specified by:
      ramBytesUsed in interface org.apache.lucene.util.Accountable
    • recordCount

      public long recordCount()
      Description copied from interface: QuerySuggester
      return amount of records indexed into this QuerySuggester.
      Specified by:
      recordCount in interface QuerySuggester
      Returns:
      amount of indexed records