| java.lang.Object com.ecyrd.jspwiki.search.LuceneSearchProvider
LuceneSearchProvider | public class LuceneSearchProvider implements SearchProvider(Code) | | Interface for the search providers that handle searching the Wiki
author: Arent-Jan Banck since: 2.2.21. |
FLAG_CONTEXTS | final public static int FLAG_CONTEXTS(Code) | | Create contexts also. Generating contexts can be expensive,
so they're not on by default.
|
LUCENE_ATTACHMENTS | final protected static String LUCENE_ATTACHMENTS(Code) | | |
LUCENE_AUTHOR | final protected static String LUCENE_AUTHOR(Code) | | |
LUCENE_OPTIMIZE_COUNT | final public static int LUCENE_OPTIMIZE_COUNT(Code) | | Number of page updates before we optimize the index.
|
LUCENE_PAGE_CONTENTS | final protected static String LUCENE_PAGE_CONTENTS(Code) | | |
LUCENE_PAGE_NAME | final protected static String LUCENE_PAGE_NAME(Code) | | |
PROP_LUCENE_ANALYZER | final public static String PROP_LUCENE_ANALYZER(Code) | | Which analyzer to use. Default is StandardAnalyzer.
|
log | final protected static Logger log(Code) | | |
doFullLuceneReindex | protected void doFullLuceneReindex() throws IOException(Code) | | Performs a full Lucene reindex, if necessary.
throws: IOException - If there's a problem during indexing |
findPages | public Collection findPages(String query, int flags) throws ProviderException(Code) | | Searches pages using a particular combination of flags.
Parameters: query - The query to perform in Lucene query language Parameters: flags - A set of flags A Collection of SearchResult instances throws: ProviderException - if there is a problem with the backend |
getAttachmentContent | protected String getAttachmentContent(String attachmentName, int version)(Code) | | Fetches the attachment content from the repository.
Content is flat text that can be used for indexing/searching or display
|
getAttachmentContent | protected String getAttachmentContent(Attachment att)(Code) | | Parameters: att - Attachment to get content for. Filename extension is used to determine the type of the attachment. String representing the content of the file.FIXME This is a very simple implementation of some text-based attachment, mainly used for testing.This should be replaced /moved to Attachment search providers or some other 'plugable' wat to search attachments |
getEngine | protected WikiEngine getEngine()(Code) | | Returns the handling engine.
Current WikiEngine |
luceneIndexPage | protected Document luceneIndexPage(WikiPage page, String text, IndexWriter writer) throws IOException(Code) | | Indexes page using the given IndexWriter.
Parameters: page - WikiPage Parameters: text - Page text to index Parameters: writer - The Lucene IndexWriter to use for indexing the created index Document throws: IOException - If there's an indexing problem |
reindexPage | public void reindexPage(WikiPage page)(Code) | | Adds a page-text pair to the lucene update queue. Safe to call always
Parameters: page - WikiPage to add to the update queue. |
updateLuceneIndex | protected synchronized void updateLuceneIndex(WikiPage page, String text)(Code) | | Updates the lucene index for a single page.
Parameters: page - The WikiPage to check Parameters: text - The page text to index. |
|
|