ElasticSearch operationThreaded Method Not Available

Hi everyone,

I am using Es 5.4.0.

org.elasticsearch
elasticsearch
version>5.4.0

I am using the following code to create a delete document request in scala

val settings = Settings.builder().put("cluster.name", _clusterName).build()
val client = new PreBuiltTransportClient(settings)
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(_host), _port))
val response = client.prepareDelete(_indexName, _TypeName, id).get()

The document deletes from the es index but the effect on the index comes very late.

In the docs I saw a way to make it fast i-e to setOperationThreaded(false) but the problem is that this method is only available in the GetRequestBuilder
val response = client.prepareGet(_indexName, _typeName, id).setOperationThreaded(false).get()

As the 5.4 docs say that this method is available in all the RequestBuilder whether it is Get/Delete/Update.

Morever I can see the diffence between org.elasticsearch.action.delete.DeleteRequestBuilder and org.elasticsearch.action.get.GetRequestBuilder classes which is the following

public class GetRequestBuilder extends SingleShardOperationRequestBuilder<GetRequest, GetResponse, GetRequestBuilder> {
}

public class DeleteRequestBuilder extends ReplicationRequestBuilder<DeleteRequest, DeleteResponse, DeleteRequestBuilder>
implements WriteRequestBuilder {
}

which conclude that the method I am looking for is not available in Delete API, but the docs say a different story. Can anyone please guide me?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.