public class MultiElasticsearchAdminServiceImpl extends ElasticsearchAdminServiceImpl
ElasticsearchAdminServiceImpl that handles multiple Elasticsearch clusters| Modifier and Type | Field and Description |
|---|---|
protected org.elasticsearch.client.RestHighLevelClient[] |
writeClients
Elasticsearch clients used for write-related operations
|
authoringIndexSettings, DEFAULT_INDEX_NAME_SUFFIX, elasticsearchClient, indexNameSuffix, previewIndexSettings| Constructor and Description |
|---|
MultiElasticsearchAdminServiceImpl(org.springframework.core.io.Resource authoringIndexSettings,
org.springframework.core.io.Resource previewIndexSettings,
org.elasticsearch.client.RestHighLevelClient readClient,
org.elasticsearch.client.RestHighLevelClient[] writeClients) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
createIndex(String indexName,
boolean isAuthoring)
Creates an index
|
void |
deleteIndex(String indexName)
Deletes an index
|
doCreateIndex, doDeleteIndex, exists, setIndexNameSuffixprotected org.elasticsearch.client.RestHighLevelClient[] writeClients
public MultiElasticsearchAdminServiceImpl(org.springframework.core.io.Resource authoringIndexSettings,
org.springframework.core.io.Resource previewIndexSettings,
org.elasticsearch.client.RestHighLevelClient readClient,
org.elasticsearch.client.RestHighLevelClient[] writeClients)
public void createIndex(String indexName, boolean isAuthoring) throws ElasticsearchException
createIndex in interface ElasticsearchAdminServicecreateIndex in class ElasticsearchAdminServiceImplindexName - the name of the indexisAuthoring - indicates if the index if for authoringElasticsearchException - if there is any error during the operationpublic void deleteIndex(String indexName) throws ElasticsearchException
deleteIndex in interface ElasticsearchAdminServicedeleteIndex in class ElasticsearchAdminServiceImplindexName - the name of the indexElasticsearchException - if there is any error during the operationpublic void close()
throws Exception
close in interface AutoCloseableclose in class ElasticsearchAdminServiceImplExceptionCopyright © 2020 CrafterCMS. All rights reserved.