Class QuerySuggestManager

java.lang.Object
de.cxp.ocs.smartsuggest.QuerySuggestManager
All Implemented Interfaces:
AutoCloseable

public class QuerySuggestManager extends Object implements AutoCloseable

The QuerySuggestManager cares about the creation of QuerySuggester objects and also makes sure they are coupled to an internal asynchronous update process which is scheduled according a configurable update rate.

Since the QuerySuggestManager internally holds an executor service, it must be closed when it and the created QuerySuggester instances are no longer in use.

  • Field Details

  • Method Details

    • builder

    • getQuerySuggester

      public QuerySuggester getQuerySuggester(@NonNull @NonNull String indexName)
      Retrieves the query suggester for the given indexName. Initializes a new query suggester if non exists yet, for that client. A background job ensures the data of that query suggester get's updated regularly.
      Parameters:
      indexName - index name of the wanted suggester
      Returns:
      initialized query suggester
    • getQuerySuggester

      public QuerySuggester getQuerySuggester(@NonNull @NonNull String indexName, boolean synchronous)
    • destroyQuerySuggester

      public void destroyQuerySuggester(String indexName)
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable