Package org.apache.wiki.search
Interface SearchManager
- All Superinterfaces:
EventListener
,InternalModule
,PageFilter
,WikiEventListener
- All Known Implementing Classes:
DefaultSearchManager
Manages searching the Wiki.
- Since:
- 2.2.21.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault Collection<SearchResult>
Sends a search to the current search provider.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.Methods inherited from interface org.apache.wiki.api.filters.PageFilter
destroy, initialize, postSave, postTranslate, preSave, preTranslate
Methods inherited from interface org.apache.wiki.event.WikiEventListener
actionPerformed
-
Field Details
-
DEFAULT_SEARCHPROVIDER
- See Also:
-
PROP_SEARCHPROVIDER
Property name for setting the search provider. Value is "jspwiki.searchProvider".- See Also:
-
JSON_SEARCH
The name of the JSON object that manages search.- See Also:
-
-
Method Details
-
getSearchEngine
Returns the SearchProvider used.- Returns:
- The current SearchProvider.
-
findPages
default Collection<SearchResult> findPages(String query, Context wikiContext) throws ProviderException, 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.IOException
- If something else goes wrong.
-
pageRemoved
Removes the page from the search cache (if any).- Parameters:
page
- The page to remove
-
reindexPage
Forces the reindex of the given page.- Parameters:
page
- The page.
-