-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Closed
Closed
Copy link
Labels
:Clients/Java Low Level REST ClientMinimal dependencies Java Client for ElasticsearchMinimal dependencies Java Client for Elasticsearchfeedback_needed
Description
Using the AWS Elasticsearch Service with the latest possible version (6.0.1) deployed.
When doing basic requests like an index check using HEAD /<indexname>
I am getting a response with status code 400 and an empty response body. The request works fine with a basic HTTP Client.
I was unable to produce this locally. This seems to be an issue in the low level REST Client.
Elasticsearch version 6.0.1
@Bean
open fun elasticsearchLowClient(): RestClient {
return RestClient.builder(
HttpHost(elasticsearchHost, elasticsearchPort, elasticsearchProtocol)
).build()
}
val indexExistsResponse = elasticsearchLowClient.performRequest("HEAD", index, mapOf()) // <- 400 empty response
if (indexExistsResponse.statusLine.statusCode == 404) {
elasticsearchLowClient.performRequest(
"PUT", index, hashMapOf(),
StringEntity("...valid", ContentType.APPLICATION_JSON)
)
}
morris and Niass
Metadata
Metadata
Assignees
Labels
:Clients/Java Low Level REST ClientMinimal dependencies Java Client for ElasticsearchMinimal dependencies Java Client for Elasticsearchfeedback_needed