I'm using Elastic Java API in Scala to delete a list of document, using their ID to delete them one at a time, no success for now. API works fine for other calls like SearchResponse.
My code looks like this :
var deleteResp : DeleteResponse = null
deleteResp = ElasticSearch.getClient()
.prepareDelete(index, type, id)
.get()
Same with :
deleteResp = ElasticSearch.getClient()
.prepareDelete(index, type, id)
.execute()
.actionGet()
I also tried to catch Elastic response for debugging using this, but nothing shows up in stdout.
try{ \ previous code }
catch {
case e: Exception => {
print("Failed deletion", e.getMessage)
e.printStackTrace() }
}
Config :
- Scala 2.10.6
- Spark 1.6
- Elasticsearch 2.3.2
Thank you
curl -XGET localhost:9200/index/type/id?deleteResp?org.elasticsearch.action.delete.DeleteResponse@5da55732However when I directly send a DELETE command in Sense it's working fine.