public interface ElasticSearchAdmin
Modifier and Type | Method and Description |
---|---|
void |
dropAndInitIndex(String indexName)
Reinitialize an index.
|
default void |
dropAndInitRepositoryIndex(String repositoryName)
Reinitialize the index of a repository.
|
void |
dropAndInitRepositoryIndex(String repositoryName,
boolean syncAlias)
Reinitialize the index of a repository.
|
void |
flush()
Elasticsearch flush on all document indexes, triggers a lucene commit, empties the transaction log.
|
void |
flushRepositoryIndex(String repositoryName)
Elasticsearch flush on document index for a specific repository, triggers a lucene commit, empties the
transaction log.
|
ESClient |
getClient()
Retrieves the
Client that can be used to access Elasticsearch API |
String |
getIndexNameForRepository(String repositoryName)
Get the search index name associated with the repository name.
|
String |
getIndexNameForType(String type)
Get the first search index name with the given type.
|
List<String> |
getIndexNamesForType(String type)
Get the index names with the given type.
|
long |
getPendingWorkerCount()
Returns the number of indexing worker scheduled waiting to be executed.
|
String |
getRepositoryForIndex(String indexName)
Gets the repository name associated with the index.
|
List<String> |
getRepositoryNames()
List repository names that have Elasticsearch support.
|
long |
getRunningWorkerCount()
Returns the number of indexing worker that are currently running.
|
int |
getTotalCommandProcessed()
Returns the total number of command processed by Elasticsearch for this Nuxeo instance.
|
String |
getWriteIndexName(String searchIndexName)
Returns the index to use for any write operations.
|
void |
initIndexes(boolean dropIfExists)
Initialize Elasticsearch indexes.
|
boolean |
isEmbedded()
Returns true if the Elasticsearch is embedded with Nuxeo, sharing the same JVM.
|
boolean |
isIndexingInProgress()
Returns true if there are indexing activities scheduled or running.
|
void |
optimize()
Elasticsearch run
optimizeRepositoryIndex(java.lang.String) on all document indexes, |
void |
optimizeIndex(String indexName)
Elasticsearch optimize operation allows to reduce the number of segments to one, Note that this can potentially
be a very heavy operation.
|
void |
optimizeRepositoryIndex(String repositoryName)
Elasticsearch optimize operation allows to reduce the number of segments to one, Note that this can potentially
be a very heavy operation.
|
com.google.common.util.concurrent.ListenableFuture<Boolean> |
prepareWaitForIndexing()
A
Future that accepts callback on completion when all the indexing worker are done. |
void |
refresh()
Refresh all document indexes, immediately after the operation occurs, so that the updated document appears in
search results immediately.
|
void |
refreshRepositoryIndex(String repositoryName)
Refresh document index for the specific repository, immediately after the operation occurs, so that the updated
document appears in search results immediately.
|
void |
syncSearchAndWriteAlias(String searchIndexName)
Make sure that the search alias point to the same index as the write alias.
|
boolean |
useExternalVersion()
When true use an external version for Elasticsearch document, this enable an optimistic concurrency control
ensuring that an older version of a document never overwrites a newer version.
|
ESClient getClient()
Client
that can be used to access Elasticsearch APIvoid initIndexes(boolean dropIfExists)
dropIfExists
- if {true} remove an existing indexvoid dropAndInitIndex(String indexName)
default void dropAndInitRepositoryIndex(String repositoryName)
void dropAndInitRepositoryIndex(String repositoryName, boolean syncAlias)
syncSearchAndWriteAlias(String)
List<String> getRepositoryNames()
String getIndexNameForRepository(String repositoryName)
NoSuchElementException
- if there is no Elasticsearch index associated with the requested repository.String getRepositoryForIndex(String indexName)
List<String> getIndexNamesForType(String type)
String getIndexNameForType(String type)
NoSuchElementException
- if there is no Elasticsearch index with the given type.String getWriteIndexName(String searchIndexName)
void syncSearchAndWriteAlias(String searchIndexName)
boolean isIndexingInProgress()
com.google.common.util.concurrent.ListenableFuture<Boolean> prepareWaitForIndexing()
Future
that accepts callback on completion when all the indexing worker are done.void refresh()
void refreshRepositoryIndex(String repositoryName)
void flush()
void flushRepositoryIndex(String repositoryName)
void optimize()
optimizeRepositoryIndex(java.lang.String)
on all document indexes,void optimizeRepositoryIndex(String repositoryName)
void optimizeIndex(String indexName)
long getPendingWorkerCount()
long getRunningWorkerCount()
int getTotalCommandProcessed()
boolean isEmbedded()
boolean useExternalVersion()
Copyright © 2018 Nuxeo. All rights reserved.