public interface ElasticsearchClient
Modifier and Type | Method and Description |
---|---|
void |
createAliasForIndex(String alias,
String index)
Creates a new alias for the given index.
|
void |
createCustomAlias(String alias,
String indexMapping) |
com.fasterxml.jackson.databind.JsonNode |
createIndex(String indexName,
String alias,
String indexMapping)
Creates an index with the given name and creates an alias with the same name at the same time.
|
void |
deleteAliasAndRelatedIndices(String alias) |
void |
deleteAliasForIndex(String alias,
String index) |
void |
deleteAllIndicesWithPrefix(String prefix) |
void |
deleteByQuery(String index,
com.fasterxml.jackson.databind.node.ObjectNode requestNode) |
void |
deleteDocument(String alias,
String id) |
void |
deleteIndexIfExists(String index) |
com.fasterxml.jackson.databind.JsonNode |
getById(String index,
String id) |
com.fasterxml.jackson.databind.JsonNode |
getIndexCurrentMapping(String index) |
String |
getIndexNameForAlias(String alias) |
org.elasticsearch.client.RestHighLevelClient |
getRestHighLevelClient() |
org.elasticsearch.client.RestClient |
getRestLowLevelClient() |
com.fasterxml.jackson.databind.JsonNode |
getVersionInformation() |
boolean |
indexExists(String index) |
com.fasterxml.jackson.databind.JsonNode |
query(String index,
com.fasterxml.jackson.databind.node.ObjectNode queryBody) |
com.fasterxml.jackson.databind.JsonNode |
query(String index,
String queryBody) |
void |
refreshIndex(String index) |
void |
swapAlias(String alias,
String oldIndexName,
String newIndexName)
Swaps the alias from one index to another index.
|
void |
synchronousIndexDocumentRequest(String index,
String id,
com.fasterxml.jackson.databind.node.ObjectNode objectNode,
Long version)
Indexes a document using external versioning through Elasticsearch Index API, overriding the
whole document.
|
void |
synchronousUpdateDocumentRequest(String index,
String id,
com.fasterxml.jackson.databind.node.ObjectNode objectNode,
com.fasterxml.jackson.databind.node.ObjectNode scriptNode) |
void |
synchronousUpsertDocumentRequest(String index,
String id,
com.fasterxml.jackson.databind.node.ObjectNode objectNode)
Indexes a document using an upsert query
|
void |
updateAliasMapping(String indexName,
String aliasName,
com.fasterxml.jackson.databind.JsonNode indexMapping) |
void |
updateByQuery(String index,
com.fasterxml.jackson.databind.node.ObjectNode requestNode) |
void |
updateIndexMapping(String indexName,
com.fasterxml.jackson.databind.JsonNode mappingDelta) |
void |
updateIndexMetaData(String index,
com.fasterxml.jackson.databind.JsonNode metaData) |
com.fasterxml.jackson.databind.JsonNode getVersionInformation()
com.fasterxml.jackson.databind.JsonNode createIndex(String indexName, String alias, String indexMapping)
indexName
- The name of the index.alias
- The alias name for the index. If alias is null, NO alias will be created, but the index still will be created.indexMapping
- The full ES mapping json that will be created.void createAliasForIndex(String alias, String index)
void swapAlias(String alias, String oldIndexName, String newIndexName)
void synchronousUpsertDocumentRequest(String index, String id, com.fasterxml.jackson.databind.node.ObjectNode objectNode)
void synchronousIndexDocumentRequest(String index, String id, com.fasterxml.jackson.databind.node.ObjectNode objectNode, Long version)
void synchronousUpdateDocumentRequest(String index, String id, com.fasterxml.jackson.databind.node.ObjectNode objectNode, com.fasterxml.jackson.databind.node.ObjectNode scriptNode)
void updateByQuery(String index, com.fasterxml.jackson.databind.node.ObjectNode requestNode)
void deleteByQuery(String index, com.fasterxml.jackson.databind.node.ObjectNode requestNode)
void deleteAliasAndRelatedIndices(String alias)
void deleteIndexIfExists(String index)
void deleteAllIndicesWithPrefix(String prefix)
boolean indexExists(String index)
void refreshIndex(String index)
com.fasterxml.jackson.databind.JsonNode query(String index, com.fasterxml.jackson.databind.node.ObjectNode queryBody)
org.elasticsearch.client.RestClient getRestLowLevelClient()
org.elasticsearch.client.RestHighLevelClient getRestHighLevelClient()
com.fasterxml.jackson.databind.JsonNode getIndexCurrentMapping(String index)
void updateIndexMetaData(String index, com.fasterxml.jackson.databind.JsonNode metaData)
void updateAliasMapping(String indexName, String aliasName, com.fasterxml.jackson.databind.JsonNode indexMapping)
void updateIndexMapping(String indexName, com.fasterxml.jackson.databind.JsonNode mappingDelta)