| java.lang.Object org.jamwiki.search.LuceneSearchEngine
LuceneSearchEngine | public class LuceneSearchEngine implements SearchEngine(Code) | | An implementation of
org.jamwiki.search.SearchEngine that uses
Lucene to perform searches of
Wiki content.
|
Method Summary | |
public synchronized void | addToIndex(Topic topic, Collection links) Add a topic to the search index. | public synchronized void | deleteFromIndex(Topic topic) Remove a topic from the search index. | public Collection | findLinkedTo(String virtualWiki, String topicName) Find all documents that link to a specified topic.
Parameters: virtualWiki - The virtual wiki for the topic. Parameters: topicName - The name of the topic. | public Collection | findResults(String virtualWiki, String text) Find all documents that contain a specific search term, ordered by relevance.
This method supports all Lucene search query syntax.
Parameters: virtualWiki - The virtual wiki for the topic. Parameters: text - The search term being searched for. | public synchronized void | refreshIndex() Refresh the current search index by re-visiting all topic pages. |
addToIndex | public synchronized void addToIndex(Topic topic, Collection links)(Code) | | Add a topic to the search index.
Parameters: topic - The Topic object that is to be added to the index. Parameters: links - A collection containing the topic names for all topics that linkto the current topic. |
deleteFromIndex | public synchronized void deleteFromIndex(Topic topic)(Code) | | Remove a topic from the search index.
Parameters: topic - The topic object that is to be removed from the index. |
findLinkedTo | public Collection findLinkedTo(String virtualWiki, String topicName)(Code) | | Find all documents that link to a specified topic.
Parameters: virtualWiki - The virtual wiki for the topic. Parameters: topicName - The name of the topic. A collection of SearchResultEntry objects for all documents thatlink to the topic. |
findResults | public Collection findResults(String virtualWiki, String text)(Code) | | Find all documents that contain a specific search term, ordered by relevance.
This method supports all Lucene search query syntax.
Parameters: virtualWiki - The virtual wiki for the topic. Parameters: text - The search term being searched for. A collection of SearchResultEntry objects for all documents thatcontain the search term. |
refreshIndex | public synchronized void refreshIndex() throws Exception(Code) | | Refresh the current search index by re-visiting all topic pages.
throws: Exception - Thrown if any error occurs while re-indexing the Wiki. |
|
|