|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.xpn.xwiki.api.Api
com.xpn.xwiki.plugin.PluginApi<LucenePlugin>
com.xpn.xwiki.plugin.lucene.LucenePluginApi
public class LucenePluginApi
This plugin allows index based search in the contents of Wiki Pages and their attachments, as far as any text can be extracted from them. Text can be extracted from OpenOffice Writer, MSWord, PDF, XML/XHTML, plain text, etc. Text extraction is done with the help of various third party libs such as Apache POI and PDFBox and some classes from the Daisy project.
This is the main interface for using the Lucene Plugin. It acts as a facade to the LucenePlugin class.
| Field Summary | |
|---|---|
static int |
REBUILD_IN_PROGRESS
Return value for rebuildIndex() meaning that another rebuild is already in progress. |
static int |
REBUILD_NOT_ALLOWED
Return value for rebuildIndex() meaning that the caller does not have admin rights. |
| Fields inherited from class com.xpn.xwiki.api.Api |
|---|
context |
| Constructor Summary | |
|---|---|
LucenePluginApi(LucenePlugin plugin,
XWikiContext context)
|
|
| Method Summary | |
|---|---|
long |
getLuceneDocCount()
|
long |
getQueueSize()
|
SearchResults |
getSearchResults(String query,
String languages)
Searches the configured Indexes using the specified lucene query for documents in the given languages. |
SearchResults |
getSearchResults(String query,
String[] sortField,
String languages)
Searches the configured Indexes using the specified lucene query for documents in the given languages. |
SearchResults |
getSearchResults(String query,
String[] sortField,
String virtualWikiNames,
String languages)
Searches the configured Indexes using the specified lucene query for documents in the given languages belonging to one of the given virtual wikis. |
SearchResults |
getSearchResults(String query,
String sortField,
String languages)
Searches the configured Indexes using the specified lucene query for documents in the given languages. |
SearchResults |
getSearchResults(String query,
String sortField,
String virtualWikiNames,
String languages)
Searches the configured Indexes using the specified lucene query for documents in the given languages belonging to one of the given virtual wikis. |
SearchResults |
getSearchResultsFromIndexes(String query,
String[] sortField,
String indexDirs,
String languages)
Searches the named indexes using the given query for documents in the given languages |
SearchResults |
getSearchResultsFromIndexes(String query,
String indexDirs,
String languages)
Searches the named indexes using the given query for documents in the given languages |
SearchResults |
getSearchResultsFromIndexes(String query,
String sortField,
String indexDirs,
String languages)
Searches the named indexes using the given query for documents in the given languages |
int |
rebuildIndex()
Starts a rebuild of the whole index. |
int |
rebuildIndex(XWiki wiki,
Context context)
Deprecated. use rebuildIndex without context values |
int |
startIndex(Collection<String> wikis,
String hqlFilter,
boolean clearIndex,
boolean onlyNew)
Starts a rebuild of the whole index. |
| Methods inherited from class com.xpn.xwiki.plugin.PluginApi |
|---|
getInternalPlugin, getProtectedPlugin, setPlugin |
| Methods inherited from class com.xpn.xwiki.api.Api |
|---|
convert, convert, convert, convertAttachments, getXWikiContext, hasAccessLevel, hasAdminRights, hasProgrammingRights, hasWikiAdminRights |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int REBUILD_NOT_ALLOWED
rebuildIndex() meaning that the caller does not have admin rights.
public static final int REBUILD_IN_PROGRESS
rebuildIndex() meaning that another rebuild is already in progress.
| Constructor Detail |
|---|
public LucenePluginApi(LucenePlugin plugin,
XWikiContext context)
| Method Detail |
|---|
public int rebuildIndex()
public int startIndex(Collection<String> wikis,
String hqlFilter,
boolean clearIndex,
boolean onlyNew)
hqlFilter - clearIndex - onlyNew -
@Deprecated
public int rebuildIndex(XWiki wiki,
Context context)
wiki - context -
public long getQueueSize()
public long getLuceneDocCount()
public SearchResults getSearchResultsFromIndexes(String query,
String indexDirs,
String languages)
query - the query entered by the userindexDirs - comma separated list of lucene index directories to search inlanguages - comma separated list of language codes to search in, may be null to search all languages
reference to xwiki
SearchResults instance containing the results.
public SearchResults getSearchResults(String query,
String languages)
With virtual wikis enabled in your xwiki installation this will deliver results from all virtuall wikis. For
searching in a subset of your virtual wikis see
#getSearchResults(String, String, String, com.xpn.xwiki.api.XWiki)
query - query entered by the userlanguages - comma separated list of language codes to search in, may be null to search all languages.
Language codes can be:
default for content having no specific language informationen, de as used by xwikiSearchResults instance containing the results.
public SearchResults getSearchResultsFromIndexes(String query,
String sortField,
String indexDirs,
String languages)
query - the query entered by the usersortField - sortField to sort onindexDirs - comma separated list of lucene index directories to search inlanguages - comma separated list of language codes to search in, may be null to search all languages
reference to xwiki
SearchResults instance containing the results.
public SearchResults getSearchResultsFromIndexes(String query,
String[] sortField,
String indexDirs,
String languages)
query - the query entered by the usersortField - sortField(s) to sort onindexDirs - comma separated list of lucene index directories to search inlanguages - comma separated list of language codes to search in, may be null to search all languages
reference to xwiki
SearchResults instance containing the results.
public SearchResults getSearchResults(String query,
String sortField,
String languages)
With virtual wikis enabled in your xwiki installation this will deliver results from all virtuall wikis. For
searching in a subset of your virtual wikis see
#getSearchResults(String, String, String, com.xpn.xwiki.api.XWiki)
query - query entered by the usersortField - field to use to sort the results list (ex: date, author)languages - comma separated list of language codes to search in, may be null to search all languages.
Language codes can be:
default for content having no specific language informationen, de as used by xwikiSearchResults instance containing the results.
public SearchResults getSearchResults(String query,
String sortField,
String virtualWikiNames,
String languages)
Using this method only makes sense with virtual wikis enabled. Otherwise use
#getSearchResults(String, String, com.xpn.xwiki.api.XWiki) instead.
query - query entered by the usersortField - field to sort onvirtualWikiNames - Names of the virtual wikis to search in. May be null for global search.languages - comma separated list of language codes to search in, may be null to search all languages.
Language codes can be:
default for content having no specific language informationen, de as used by xwikiSearchResults instance containing the results.
public SearchResults getSearchResults(String query,
String[] sortField,
String languages)
With virtual wikis enabled in your xwiki installation this will deliver results from all virtuall wikis. For
searching in a subset of your virtual wikis see
#getSearchResults(String, String, String, com.xpn.xwiki.api.XWiki)
query - query entered by the userlanguages - comma separated list of language codes to search in, may be null to search all languages.
Language codes can be:
default for content having no specific language informationen, de as used by xwikiSearchResults instance containing the results.
public SearchResults getSearchResults(String query,
String[] sortField,
String virtualWikiNames,
String languages)
Using this method only makes sense with virtual wikis enabled. Otherwise use
#getSearchResults(String, String, com.xpn.xwiki.api.XWiki) instead.
query - query entered by the usersortField - field to sort onvirtualWikiNames - Names of the virtual wikis to search in. May be null for global search.languages - comma separated list of language codes to search in, may be null to search all languages.
Language codes can be:
default for content having no specific language informationen, de as used by xwikiSearchResults instance containing the results.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||