public interface SearchManager extends PageFilter, InternalModule, WikiEventListener
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_SEARCHPROVIDER |
static java.lang.String |
JSON_SEARCH
The name of the JSON object that manages search.
|
static java.lang.String |
PROP_SEARCHPROVIDER
Property name for setting the search provider.
|
| Modifier and Type | Method and Description |
|---|---|
default java.util.Collection<SearchResult> |
findPages(java.lang.String query,
Context wikiContext)
Sends a search to the current search provider.
|
SearchProvider |
getSearchEngine()
Returns the SearchProvider used.
|
default void |
pageRemoved(Page page)
Removes the page from the search cache (if any).
|
default void |
reindexPage(Page page)
Forces the reindex of the given page.
|
destroy, initialize, postSave, postTranslate, preSave, preTranslateactionPerformedstatic final java.lang.String DEFAULT_SEARCHPROVIDER
static final java.lang.String PROP_SEARCHPROVIDER
static final java.lang.String JSON_SEARCH
SearchProvider getSearchEngine()
default java.util.Collection<SearchResult> findPages(java.lang.String query, Context wikiContext) throws ProviderException, java.io.IOException
query - The query. Null is safe, and is interpreted as an empty query.wikiContext - the context within which to run the searchProviderException - If the provider fails and a search cannot be completed.java.io.IOException - If something else goes wrong.default void pageRemoved(Page page)
page - The page to removedefault void reindexPage(Page page)
page - The page.Copyright (c) 2001-2022 The Apache Software Foundation. All rights reserved.