Interface ElasticsearchClient
- All Known Implementing Classes:
ElasticsearchClientImpl
public interface ElasticsearchClient
Low-level operations for Elasticsearch.
Doesn't know anything about aliases, this must be handled in the layer above.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateAliasForIndex(String alias, String index) Creates a new alias for the given index.voidcreateCustomAlias(String alias, String indexMapping) tools.jackson.databind.JsonNodecreateIndex(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.voidvoiddeleteAliasForIndex(String alias, String index) voiddeleteByQuery(String index, tools.jackson.databind.node.ObjectNode requestNode) voiddeleteDocument(String alias, String id) voiddeleteIndexIfExists(String index) tools.jackson.databind.JsonNodetools.jackson.databind.JsonNodegetIndexCurrentMapping(String index) tools.jackson.databind.JsonNodegetIndexCurrentSettings(String index) getIndexNameForAlias(String alias) tools.jackson.databind.JsonNodebooleanindexExists(String index) tools.jackson.databind.JsonNodetools.jackson.databind.JsonNodevoidrefreshIndex(String index) tools.jackson.databind.JsonNodesetIndexSettings(String index, tools.jackson.databind.node.ObjectNode settings) voidSwaps the alias from one index to another index.voidsynchronousIndexDocumentRequest(String index, String id, tools.jackson.databind.node.ObjectNode objectNode, Long version) Indexes a document using external versioning through Elasticsearch Index API, overriding the whole document.voidsynchronousUpdateDocumentRequest(String index, String id, tools.jackson.databind.node.ObjectNode objectNode, tools.jackson.databind.node.ObjectNode scriptNode) voidsynchronousUpsertDocumentRequest(String index, String id, tools.jackson.databind.node.ObjectNode objectNode) Indexes a document using an upsert queryvoidupdateAliasMapping(String indexName, String aliasName, tools.jackson.databind.JsonNode indexMapping) voidupdateByQuery(String index, tools.jackson.databind.node.ObjectNode requestNode) voidupdateIndexMapping(String indexName, tools.jackson.databind.JsonNode mappingDelta) voidupdateIndexMetaData(String index, tools.jackson.databind.JsonNode metaData)
-
Method Details
-
getVersionInformation
tools.jackson.databind.JsonNode getVersionInformation() -
createIndex
Creates an index with the given name and creates an alias with the same name at the same time.- Parameters:
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.
-
createAliasForIndex
-
swapAlias
-
synchronousUpsertDocumentRequest
-
synchronousIndexDocumentRequest
-
synchronousUpdateDocumentRequest
-
updateByQuery
-
deleteDocument
-
deleteByQuery
-
deleteAliasForIndex
-
deleteAliasAndRelatedIndices
-
deleteIndexIfExists
-
indexExists
-
refreshIndex
-
getIndexNameForAlias
-
getById
-
query
-
query
tools.jackson.databind.JsonNode query(String index, tools.jackson.databind.node.ObjectNode queryBody) -
createCustomAlias
-
getIndexCurrentMapping
-
getIndexCurrentSettings
-
setIndexSettings
tools.jackson.databind.JsonNode setIndexSettings(String index, tools.jackson.databind.node.ObjectNode settings) -
updateIndexMetaData
-
updateAliasMapping
-
updateIndexMapping
-
bulkRequest
ElasticsearchClient.BulkRequestClient bulkRequest()
-