public class BasicSearchProvider extends Object implements SearchProvider
LATEST_VERSION
Constructor and Description |
---|
BasicSearchProvider() |
Modifier and Type | Method and Description |
---|---|
Collection<SearchResult> |
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 WikiProvider
engine
- 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 SearchProvider
page
- Page to remove from search indexpublic void reindexPage(WikiPage page)
reindexPage
in interface SearchProvider
page
- The WikiPage to be indexed.public QueryItem[] parseQuery(String query)
query
- A query string.public Collection<SearchResult> findPages(String query, WikiContext wikiContext)
findPages
in interface SearchProvider
query
- query to search forwikiContext
- the context within which to run the searchpublic String getProviderInfo()
getProviderInfo
in interface WikiProvider
Copyright © 2001-2019 The Apache Software Foundation. All rights reserved.