Package org.apache.wiki.search
Class BasicSearchProvider
- java.lang.Object
- 
- org.apache.wiki.search.BasicSearchProvider
 
- 
- All Implemented Interfaces:
- WikiProvider,- SearchProvider
 
 public class BasicSearchProvider extends java.lang.Object implements SearchProvider Interface for the search providers that handle searching the Wiki- Since:
- 2.2.21.
 
- 
- 
Field Summary- 
Fields inherited from interface org.apache.wiki.api.providers.WikiProviderLATEST_VERSION
 
- 
 - 
Constructor SummaryConstructors Constructor Description BasicSearchProvider()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<SearchResult>findPages(java.lang.String query, Context wikiContext)Search for pages matching a search query.java.lang.StringgetProviderInfo()Return a valid HTML string for information.voidinitialize(Engine engine, java.util.Properties props)Initializes the page provider.voidpageRemoved(Page page)Delete a page from the search index.QueryItem[]parseQuery(java.lang.String query)Parses a query into something that we can use.voidreindexPage(Page page)Adds a WikiPage for indexing queue.
 
- 
- 
- 
Constructor Detail- 
BasicSearchProviderpublic BasicSearchProvider() 
 
- 
 - 
Method Detail- 
initializepublic void initialize(Engine engine, java.util.Properties props) throws NoRequiredPropertyException, java.io.IOException Initializes the page provider.- Specified by:
- initializein interface- WikiProvider
- Parameters:
- engine- Engine to own this provider
- props- A set of properties used to initialize this provider
- Throws:
- NoRequiredPropertyException- If the provider needs a property which is not found in the property set
- java.io.IOException- If there is an IO problem
 
 - 
pageRemovedpublic void pageRemoved(Page page) Delete a page from the search index.- Specified by:
- pageRemovedin interface- SearchProvider
- Parameters:
- page- Page to remove from search index.
 
 - 
reindexPagepublic void reindexPage(Page page) Adds a WikiPage for indexing queue. This is called a queue, since this method is expected to return pretty quickly, and indexing to be done in a separate thread.- Specified by:
- reindexPagein interface- SearchProvider
- Parameters:
- page- The WikiPage to be indexed.
 
 - 
parseQuerypublic QueryItem[] parseQuery(java.lang.String query) Parses a query into something that we can use.- Parameters:
- query- A query string.
- Returns:
- A parsed array.
 
 - 
findPagespublic java.util.Collection<SearchResult> findPages(java.lang.String query, Context wikiContext) Search for pages matching a search query.- Specified by:
- findPagesin interface- SearchProvider
- Parameters:
- query- query to search for
- wikiContext- the context within which to run the search
- Returns:
- collection of pages that match query
 
 - 
getProviderInfopublic java.lang.String getProviderInfo() Return a valid HTML string for information. May be anything.- Specified by:
- getProviderInfoin interface- WikiProvider
- Returns:
- A string describing the provider.
 
 
- 
 
-