public class ElasticSearchAdminImpl extends Object implements ElasticSearchAdmin
Constructor and Description |
---|
ElasticSearchAdminImpl(ElasticSearchLocalConfig localConfig,
ElasticSearchRemoteConfig remoteConfig,
Map<String,ElasticSearchIndexConfig> indexConfig)
Init the admin service, remote configuration if not null will take
precedence over local embedded configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
disconnect() |
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.
|
org.elasticsearch.client.Client |
getClient()
Retrieves the
Client that can be used to access Elasticsearch API |
int |
getPendingCommands()
Returns the number of indexing command that are waiting to be processed.
|
int |
getPendingDocs()
Returns the number of documents that are waiting for being indexed.
|
int |
getRunningCommands()
Returns the number of indexing command that are currently running
|
int |
getTotalCommandProcessed()
Returns the total number of command processed by Elasticsearch.
|
void |
initIndexes(boolean dropIfExists)
Initialize Elasticsearch indexes.
|
boolean |
isIndexingInProgress()
Returns true if there are indexing activities.
|
boolean |
isReady() |
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.
|
public ElasticSearchAdminImpl(ElasticSearchLocalConfig localConfig, ElasticSearchRemoteConfig remoteConfig, Map<String,ElasticSearchIndexConfig> indexConfig)
public void disconnect()
public void refreshRepositoryIndex(String repositoryName)
ElasticSearchAdmin
refreshRepositoryIndex
in interface ElasticSearchAdmin
public void flushRepositoryIndex(String repositoryName)
ElasticSearchAdmin
flushRepositoryIndex
in interface ElasticSearchAdmin
public void refresh()
ElasticSearchAdmin
refresh
in interface ElasticSearchAdmin
public void flush()
ElasticSearchAdmin
flush
in interface ElasticSearchAdmin
public org.elasticsearch.client.Client getClient()
ElasticSearchAdmin
Client
that can be used to access Elasticsearch APIgetClient
in interface ElasticSearchAdmin
public void initIndexes(boolean dropIfExists)
ElasticSearchAdmin
initIndexes
in interface ElasticSearchAdmin
dropIfExists
- if {true} remove an existing indexpublic int getPendingDocs()
ElasticSearchAdmin
getPendingDocs
in interface ElasticSearchAdmin
public int getPendingCommands()
ElasticSearchAdmin
getPendingCommands
in interface ElasticSearchAdmin
public int getTotalCommandProcessed()
ElasticSearchAdmin
getTotalCommandProcessed
in interface ElasticSearchAdmin
public int getRunningCommands()
ElasticSearchAdmin
getRunningCommands
in interface ElasticSearchAdmin
public boolean isIndexingInProgress()
ElasticSearchAdmin
isIndexingInProgress
in interface ElasticSearchAdmin
public boolean isReady()
Copyright © 2014 Nuxeo SA. All rights reserved.