public class MultiElasticsearchServiceImpl extends ElasticsearchServiceImpl
ElasticsearchServiceImpl that handles multiple Elasticsearch clusters| Modifier and Type | Field and Description |
|---|---|
protected org.elasticsearch.client.RestHighLevelClient[] |
writeClients
Elasticsearch clients used for write-related operations
|
DEFAULT_DOC, DEFAULT_LOCAL_ID_NAME, DEFAULT_SCROLL_SIZE, DEFAULT_SCROLL_TIMEOUT, documentBuilder, documentParser, elasticsearchClient, localIdFieldName, scrollSize, scrollTimeout| Constructor and Description |
|---|
MultiElasticsearchServiceImpl(ElasticsearchDocumentBuilder documentBuilder,
DocumentParser documentParser,
org.elasticsearch.client.RestHighLevelClient readClient,
org.elasticsearch.client.RestHighLevelClient[] writeClients) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
delete(String indexName,
String siteName,
String docId)
Performs a delete for the given document
|
void |
index(String indexName,
String siteName,
String docId,
Map<String,Object> doc) |
doDelete, doIndex, doRefresh, getId, index, indexBinary, indexBinary, refresh, searchField, searchId, setLocalIdFieldName, setScrollSize, setScrollTimeoutclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitindexprotected org.elasticsearch.client.RestHighLevelClient[] writeClients
public MultiElasticsearchServiceImpl(ElasticsearchDocumentBuilder documentBuilder, DocumentParser documentParser, org.elasticsearch.client.RestHighLevelClient readClient, org.elasticsearch.client.RestHighLevelClient[] writeClients)
public void delete(String indexName, String siteName, String docId) throws ElasticsearchException
delete in interface ElasticsearchServicedelete in class ElasticsearchServiceImplindexName - the name of the indexsiteName - the id of the sitedocId - the id of the documentElasticsearchException - if there is any error during the operationpublic void index(String indexName, String siteName, String docId, Map<String,Object> doc) throws ElasticsearchException
index in interface ElasticsearchServiceindex in class ElasticsearchServiceImplElasticsearchExceptionpublic void close()
throws Exception
close in interface AutoCloseableclose in class ElasticsearchServiceImplExceptionCopyright © 2023 CrafterCMS. All rights reserved.