Package io.camunda.search.test.utils
Class SearchClientAdapter
java.lang.Object
io.camunda.search.test.utils.SearchClientAdapter
-
Constructor Summary
ConstructorsConstructorDescriptionSearchClientAdapter(co.elastic.clients.elasticsearch.ElasticsearchClient elsClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper) SearchClientAdapter(org.opensearch.client.opensearch.OpenSearchClient osClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateIndex(String indexName, int numberOfReplicas) voiddeleteIndex(String indexName) voiddeleteIndexTemplate(String templateName) <T> TgetAllIndicesAsNode(String indexPrefix) co.elastic.clients.elasticsearch.ElasticsearchClientcom.fasterxml.jackson.databind.JsonNodegetIndexAsNode(String indexName) com.fasterxml.jackson.databind.JsonNodegetIndexTemplateAsNode(String templateName) com.fasterxml.jackson.databind.JsonNodegetPolicyAsNode(String policyName) voidrefresh()
-
Constructor Details
-
SearchClientAdapter
public SearchClientAdapter(co.elastic.clients.elasticsearch.ElasticsearchClient elsClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
SearchClientAdapter
public SearchClientAdapter(org.opensearch.client.opensearch.OpenSearchClient osClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
getElsClient
public co.elastic.clients.elasticsearch.ElasticsearchClient getElsClient() -
getIndexAsNode
- Throws:
IOException
-
getAllIndicesAsNode
public Map<String,com.fasterxml.jackson.databind.JsonNode> getAllIndicesAsNode(String indexPrefix) throws IOException - Throws:
IOException
-
getPolicyAsNode
public com.fasterxml.jackson.databind.JsonNode getPolicyAsNode(String policyName) throws IOException - Throws:
IOException
-
getIndexTemplateAsNode
public com.fasterxml.jackson.databind.JsonNode getIndexTemplateAsNode(String templateName) throws IOException - Throws:
IOException
-
get
- Throws:
IOException
-
index
- Throws:
IOException
-
createIndex
- Throws:
IOException
-
deleteIndex
- Throws:
IOException
-
deleteIndexTemplate
- Throws:
IOException
-
refresh
- Throws:
IOException
-