|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.xpn.xwiki.plugin.XWikiDefaultPlugin
com.xpn.xwiki.plugin.lucene.LucenePlugin
@Deprecated public class LucenePlugin
A plugin offering support for advanced searches using Lucene, a high performance, open source search engine. It uses
an IndexUpdater to monitor and submit wiki pages for indexing to the Lucene engine, and offers simple methods
for searching documents, with the possiblity to sort by one or several document fields (besides the default sort by
relevance), filter by one or several languages, and search in one, several or all virtual wikis.
| Field Summary | |
|---|---|
static String |
DOCTYPE_ATTACHMENT
Deprecated. |
static String |
DOCTYPE_WIKIPAGE
Deprecated. |
static String |
PROP_ANALYZER
Deprecated. |
static String |
PROP_INDEX_DIR
Deprecated. |
static String |
PROP_INDEXING_INTERVAL
Deprecated. |
static String |
PROP_MAX_QUEUE_SIZE
Deprecated. |
| Constructor Summary | |
|---|---|
LucenePlugin(String name,
String className,
com.xpn.xwiki.XWikiContext context)
Deprecated. |
|
| Method Summary | |
|---|---|
protected static void |
closeSearchers(org.apache.lucene.search.Searcher[] searchers)
Deprecated. |
org.apache.lucene.search.Searcher[] |
createSearchers(String indexDirs,
com.xpn.xwiki.XWikiContext context)
Deprecated. Creates an array of Searchers for a number of lucene indexes. |
protected void |
finalize()
Deprecated. |
void |
flushCache(com.xpn.xwiki.XWikiContext context)
Deprecated. |
String |
getIndexDirs()
Deprecated. |
long |
getLuceneDocCount()
Deprecated. |
String |
getName()
Deprecated. |
Api |
getPluginApi(com.xpn.xwiki.plugin.XWikiPluginInterface plugin,
com.xpn.xwiki.XWikiContext context)
Deprecated. |
long |
getQueueSize()
Deprecated. |
SearchResults |
getSearchResults(String query,
String[] sortField,
String virtualWikiNames,
String languages,
com.xpn.xwiki.XWikiContext context)
Deprecated. Searches all Indexes configured in xwiki.cfg (property xwiki.plugins.lucene.indexdir). |
SearchResults |
getSearchResults(String query,
String sortField,
String virtualWikiNames,
String languages,
com.xpn.xwiki.XWikiContext context)
Deprecated. Searches all Indexes configured in xwiki.cfg (property xwiki.plugins.lucene.indexdir). |
SearchResults |
getSearchResultsFromIndexes(String query,
String[] sortFields,
String myIndexDirs,
String languages,
com.xpn.xwiki.XWikiContext context)
Deprecated. Allows to search special named lucene indexes without having to configure them in xwiki.cfg. |
SearchResults |
getSearchResultsFromIndexes(String query,
String sortField,
String myIndexDirs,
String languages,
com.xpn.xwiki.XWikiContext context)
Deprecated. Allows to search special named lucene indexes without having to configure them in xwiki.cfg. |
SearchResults |
getSearchResultsFromIndexes(String query,
String myIndexDirs,
String languages,
com.xpn.xwiki.XWikiContext context)
Deprecated. Allows to search special named lucene indexes without having to configure them in xwiki.cfg. |
void |
init(org.apache.lucene.store.Directory directory,
com.xpn.xwiki.XWikiContext context)
Deprecated. |
void |
init(IndexUpdater indexUpdater,
IndexRebuilder indexRebuilder,
com.xpn.xwiki.XWikiContext context)
Deprecated. |
void |
init(IndexUpdater indexUpdater,
com.xpn.xwiki.XWikiContext context)
Deprecated. |
void |
init(com.xpn.xwiki.XWikiContext context)
Deprecated. |
protected void |
openSearchers(com.xpn.xwiki.XWikiContext context)
Deprecated. Opens the searchers for the configured index Dirs after closing any already existing ones. |
void |
queueAttachment(com.xpn.xwiki.doc.XWikiDocument doc,
com.xpn.xwiki.doc.XWikiAttachment attach,
com.xpn.xwiki.XWikiContext context)
Deprecated. |
void |
queueAttachment(com.xpn.xwiki.doc.XWikiDocument doc,
com.xpn.xwiki.XWikiContext context)
Deprecated. |
void |
queueDocument(com.xpn.xwiki.doc.XWikiDocument doc,
com.xpn.xwiki.XWikiContext context)
Deprecated. |
int |
rebuildIndex(com.xpn.xwiki.XWikiContext context)
Deprecated. |
int |
startIndex(Collection<String> wikis,
String hqlFilter,
boolean clearIndex,
boolean onlyNew,
com.xpn.xwiki.XWikiContext context)
Deprecated. |
| Methods inherited from class com.xpn.xwiki.plugin.XWikiDefaultPlugin |
|---|
beginParsing, beginRendering, commonTagsHandler, downloadAttachment, endParsing, endRendering, endRenderingHandler, flushCache, getClassName, insidePREHandler, outsidePREHandler, setClassName, setName, startRenderingHandler, virtualInit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DOCTYPE_WIKIPAGE
public static final String DOCTYPE_ATTACHMENT
public static final String PROP_INDEX_DIR
public static final String PROP_ANALYZER
public static final String PROP_INDEXING_INTERVAL
public static final String PROP_MAX_QUEUE_SIZE
| Constructor Detail |
|---|
public LucenePlugin(String name,
String className,
com.xpn.xwiki.XWikiContext context)
| Method Detail |
|---|
public String getName()
getName in interface com.xpn.xwiki.plugin.XWikiPluginInterfacegetName in class com.xpn.xwiki.plugin.XWikiDefaultPlugin
public Api getPluginApi(com.xpn.xwiki.plugin.XWikiPluginInterface plugin,
com.xpn.xwiki.XWikiContext context)
getPluginApi in interface com.xpn.xwiki.plugin.XWikiPluginInterfacegetPluginApi in class com.xpn.xwiki.plugin.XWikiDefaultPlugin
protected void finalize()
throws Throwable
finalize in class ObjectThrowableObject.finalize()public int rebuildIndex(com.xpn.xwiki.XWikiContext context)
public int startIndex(Collection<String> wikis,
String hqlFilter,
boolean clearIndex,
boolean onlyNew,
com.xpn.xwiki.XWikiContext context)
public SearchResults getSearchResultsFromIndexes(String query,
String myIndexDirs,
String languages,
com.xpn.xwiki.XWikiContext context)
throws Exception
getSearchResults(String, String, String, String, XWikiContext) since new index searcher instances are
created for every query.
query - The base query, using the query engine supported by Lucene.myIndexDirs - Comma separated list of directories containing the lucene indexes to search.languages - Comma separated list of language codes to search in, may be null or empty to search all
languages.context - The context of the request.
Exception - If the index directories cannot be read, or the query is invalid.
public SearchResults getSearchResultsFromIndexes(String query,
String[] sortFields,
String myIndexDirs,
String languages,
com.xpn.xwiki.XWikiContext context)
throws Exception
getSearchResults(java.lang.String, java.lang.String, java.lang.String, java.lang.String, com.xpn.xwiki.XWikiContext)since new index searcher instances are created for every query.
query - The base query, using the query engine supported by Lucene.sortFields - A list of fields to sort results by. For each field, if the name starts with '-', then that
field (excluding the -) is used for reverse sorting. If null or empty, sort by hit score.myIndexDirs - Comma separated list of directories containing the lucene indexes to search.languages - Comma separated list of language codes to search in, may be null or empty to search all
languages.context - The context of the request.
Exception - If the index directories cannot be read, or the query is invalid.
public SearchResults getSearchResultsFromIndexes(String query,
String sortField,
String myIndexDirs,
String languages,
com.xpn.xwiki.XWikiContext context)
throws Exception
getSearchResults(String, String, String, String, XWikiContext) since new index searcher instances are
created for every query.
query - The base query, using the query engine supported by Lucene.sortField - The name of a field to sort results by. If the name starts with '-', then the field (excluding
the -) is used for reverse sorting. If null or empty, sort by hit score.myIndexDirs - Comma separated list of directories containing the lucene indexes to search.languages - Comma separated list of language codes to search in, may be null or empty to search all
languages.context - The context of the request.
Exception - If the index directories cannot be read, or the query is invalid.
public SearchResults getSearchResults(String query,
String sortField,
String virtualWikiNames,
String languages,
com.xpn.xwiki.XWikiContext context)
throws Exception
xwiki.plugins.lucene.indexdir).
query - The base query, using the query engine supported by Lucene.sortField - The name of a field to sort results by. If the name starts with '-', then the field (excluding
the -) is used for reverse sorting. If null or empty, sort by hit score.virtualWikiNames - Comma separated list of virtual wiki names to search in, may be null to search
all virtual wikis.languages - Comma separated list of language codes to search in, may be null or empty to search all
languages.context - The context of the request.
Exception - If the index directories cannot be read, or the query is invalid.
public SearchResults getSearchResults(String query,
String[] sortField,
String virtualWikiNames,
String languages,
com.xpn.xwiki.XWikiContext context)
throws Exception
xwiki.plugins.lucene.indexdir).
query - The base query, using the query engine supported by Lucene.sortField - The name of a field to sort results by. If the name starts with '-', then the field (excluding
the -) is used for reverse sorting. If null or empty, sort by hit score.virtualWikiNames - Comma separated list of virtual wiki names to search in, may be null to search
all virtual wikis.languages - Comma separated list of language codes to search in, may be null or empty to search all
languages.context - The context of the request.
Exception - If the index directories cannot be read, or the query is invalid.public void init(com.xpn.xwiki.XWikiContext context)
init in interface com.xpn.xwiki.plugin.XWikiPluginInterfaceinit in class com.xpn.xwiki.plugin.XWikiDefaultPlugin
public void init(org.apache.lucene.store.Directory directory,
com.xpn.xwiki.XWikiContext context)
public void init(IndexUpdater indexUpdater,
com.xpn.xwiki.XWikiContext context)
public void init(IndexUpdater indexUpdater,
IndexRebuilder indexRebuilder,
com.xpn.xwiki.XWikiContext context)
public void flushCache(com.xpn.xwiki.XWikiContext context)
flushCache in interface com.xpn.xwiki.plugin.XWikiPluginInterfaceflushCache in class com.xpn.xwiki.plugin.XWikiDefaultPluginXWikiDefaultPlugin.flushCache(com.xpn.xwiki.XWikiContext)
public org.apache.lucene.search.Searcher[] createSearchers(String indexDirs,
com.xpn.xwiki.XWikiContext context)
throws Exception
indexDirs - Comma separated list of Lucene index directories to create searchers for.
Exceptionprotected void openSearchers(com.xpn.xwiki.XWikiContext context)
protected static void closeSearchers(org.apache.lucene.search.Searcher[] searchers)
throws IOException
IOExceptionpublic String getIndexDirs()
public long getQueueSize()
public void queueDocument(com.xpn.xwiki.doc.XWikiDocument doc,
com.xpn.xwiki.XWikiContext context)
public void queueAttachment(com.xpn.xwiki.doc.XWikiDocument doc,
com.xpn.xwiki.doc.XWikiAttachment attach,
com.xpn.xwiki.XWikiContext context)
public void queueAttachment(com.xpn.xwiki.doc.XWikiDocument doc,
com.xpn.xwiki.XWikiContext context)
public long getLuceneDocCount()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||