public interface SearchEngine extends Application.Module
Application.Component.LifecycleState| Modifier and Type | Method and Description |
|---|---|
void |
add(Collection<SearchInputDocument> docs)
Add documents to the search index.
|
void |
add(SearchInputDocument... docs)
Add documents to the search index.
|
void |
commit()
Explicitly commit all pending changes, and wait until they are visible to
the search.
|
void |
commit(boolean wait)
Explicitly commit all pending changes, and optionally wait until they are
visible to the search.
|
SearchInputDocument |
createInputDocument()
Create a SearchInputDocument that can be populated and added to the
index.
|
SearchQuery |
createQuery()
Create a SearchQuery that can be populated and used for searching.
|
SearchQuery |
createQuery(String queryText)
Convenience method to create a SearchQuery and set the query text in one
step.
|
void |
deleteById(Collection<String> ids)
Delete documents from the search index, by unique ID.
|
void |
deleteById(String... ids)
Delete documents from the search index, by unique ID.
|
void |
deleteByQuery(String query)
Delete documents from the search index if they satisfy the query.
|
int |
documentCount()
Find the number of documents in the search index.
|
void |
ping()
Check to see whether the SearchEngine is alive.
|
SearchResponse |
query(SearchQuery query)
Query the search index and return the results.
|
shutdown, startupvoid ping() throws SearchEngineException
SearchEngineException - if the SearchEngine does not respond.SearchInputDocument createInputDocument()
void add(SearchInputDocument... docs) throws SearchEngineException
SearchEngineExceptionvoid add(Collection<SearchInputDocument> docs) throws SearchEngineException
SearchEngineExceptionvoid commit()
throws SearchEngineException
SearchEngineExceptionvoid commit(boolean wait)
throws SearchEngineException
SearchEngineExceptionvoid deleteById(String... ids) throws SearchEngineException
SearchEngineExceptionvoid deleteById(Collection<String> ids) throws SearchEngineException
SearchEngineExceptionvoid deleteByQuery(String query) throws SearchEngineException
SearchEngineExceptionSearchQuery createQuery()
SearchQuery createQuery(String queryText)
SearchResponse query(SearchQuery query) throws SearchEngineException
SearchEngineExceptionint documentCount()
throws SearchEngineException
SearchEngineExceptionCopyright © 2016. All rights reserved.