
public class BasicSearchProvider extends Object implements SearchProvider
LATEST_VERSION| Constructor and Description |
|---|
BasicSearchProvider() |
| Modifier and Type | Method and Description |
|---|---|
Collection |
findPages(String query,
WikiContext wikiContext)
Search for pages matching a search query
|
String |
getProviderInfo()
Return a valid HTML string for information.
|
void |
initialize(WikiEngine engine,
Properties props)
Initializes the page provider.
|
void |
pageRemoved(WikiPage page)
Delete a page from the search index
|
QueryItem[] |
parseQuery(String query)
Parses a query into something that we can use.
|
void |
reindexPage(WikiPage page)
Adds a WikiPage for indexing queue.
|
public BasicSearchProvider()
public void initialize(WikiEngine engine, Properties props) throws NoRequiredPropertyException, IOException
initialize in interface WikiProviderengine - WikiEngine to own this providerprops - A set of properties used to initialize this providerNoRequiredPropertyException - If the provider needs a property which is not found in the property setIOException - If there is an IO problempublic void pageRemoved(WikiPage page)
pageRemoved in interface SearchProviderpage - Page to remove from search indexpublic void reindexPage(WikiPage page)
reindexPage in interface SearchProviderpage - The WikiPage to be indexed.public QueryItem[] parseQuery(String query)
query - A query string.public Collection findPages(String query, WikiContext wikiContext)
findPages in interface SearchProviderquery - query to search forwikiContext - the context within which to run the searchpublic String getProviderInfo()
getProviderInfo in interface WikiProviderCopyright © 2001-2018 The Apache Software Foundation. All rights reserved.