public class SearchServiceImpl extends java.lang.Object implements SearchService
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addToIndex(org.apache.lucene.document.Document document)
Add a document to existing index.
|
void |
deleteFromIndex(org.apache.lucene.document.Document document)
Delete a document in existing index.
|
SearchResults |
doSearch(java.lang.String queryString,
java.util.List<java.lang.String> condQueries,
Identity identity,
Roles roles,
int firstResult,
int maxResults,
boolean doHighlighting)
Do search a certain query.
|
long |
getQueryCount() |
SearchModule |
getSearchModuleConfig()
access the module configuration
|
SearchServiceStatus |
getStatus()
Return current state of search service, Includes full-indexing, index and search.
|
void |
init()
Initializes service.
|
boolean |
isEnabled() |
void |
setMaxIndexTime(long maxIndexTime)
[used by spring]
|
void |
setMetadataFields(SearchMetadataFieldsProvider metadataFields)
[used by spring] Spring setter to inject the available metadata
|
java.util.Set<java.lang.String> |
spellCheck(java.lang.String query)
Check a query for similar words.
|
void |
startIndexing(boolean testMode)
Start a new full index.
|
void |
stop()
Shuts down search service.
|
void |
stopIndexing()
Stop current full-indexing.
|
public void setMaxIndexTime(long maxIndexTime)
public void setMetadataFields(SearchMetadataFieldsProvider metadataFields)
metadataFields - public void init()
SearchServiceinit 在接口中 SearchServicepublic void stop()
SearchServicestop 在接口中 SearchServicepublic SearchResults doSearch(java.lang.String queryString, java.util.List<java.lang.String> condQueries, Identity identity, Roles roles, int firstResult, int maxResults, boolean doHighlighting) throws ServiceNotAvailableException, QueryException
SearchServicedoSearch 在接口中 SearchServicequeryString - Search query-string.identity - Filter results for this identity (user).roles - Filter results for this roles (role of user).ServiceNotAvailableExceptionQueryExceptionpublic java.util.Set<java.lang.String> spellCheck(java.lang.String query)
SearchServicespellCheck 在接口中 SearchServicenull ifpublic void startIndexing(boolean testMode)
SearchServicestartIndexing 在接口中 SearchServicetestMode - if set to true existing index won't be replaced after new index has been generatedpublic void stopIndexing()
SearchServicestopIndexing 在接口中 SearchServicepublic void addToIndex(org.apache.lucene.document.Document document)
SearchServiceaddToIndex 在接口中 SearchServicedocument - New document.public void deleteFromIndex(org.apache.lucene.document.Document document)
SearchServicedeleteFromIndex 在接口中 SearchServicedocument - Delete this document.public long getQueryCount()
getQueryCount 在接口中 SearchServicepublic SearchServiceStatus getStatus()
SearchServicegetStatus 在接口中 SearchServicepublic SearchModule getSearchModuleConfig()
SearchServicegetSearchModuleConfig 在接口中 SearchServicepublic boolean isEnabled()
isEnabled 在接口中 SearchService