Interface SearchManager

All Superinterfaces:
java.util.EventListener, InternalModule, PageFilter, WikiEventListener
All Known Implementing Classes:
DefaultSearchManager

public interface SearchManager
extends PageFilter, InternalModule, WikiEventListener
Manages searching the Wiki.
Since:
2.2.21.
  • Field Details

  • Method Details

    • getSearchEngine

      Returns the SearchProvider used.
      Returns:
      The current SearchProvider.
    • findPages

      default java.util.Collection<SearchResult> findPages​(java.lang.String query, Context wikiContext) throws ProviderException, java.io.IOException
      Sends a search to the current search provider. The query is is whatever native format the query engine wants to use.
      Parameters:
      query - The query. Null is safe, and is interpreted as an empty query.
      wikiContext - the context within which to run the search
      Returns:
      A collection of WikiPages that matched.
      Throws:
      ProviderException - If the provider fails and a search cannot be completed.
      java.io.IOException - If something else goes wrong.
    • pageRemoved

      default void pageRemoved​(Page page)
      Removes the page from the search cache (if any).
      Parameters:
      page - The page to remove
    • reindexPage

      default void reindexPage​(Page page)
      Forces the reindex of the given page.
      Parameters:
      page - The page.