1

I am using Elasticsearch version 2.3.1

I have installed deletebyquery plugin to delete documents, And using java API to delete.

here is my java api request

DeleteByQueryRequestBuilder deleteRequest = DeleteByQueryRequestBuilder(esType, DeleteByQueryAction.INSTANCE)
        .setIndices(index)
        .setTypes(type);
deleteRequest.setQuery(boolQuery);
DeleteByQueryResponse resp = deleteRequest.get();

My question is , How to add the query string parameters such as size , routing in Deletebyquery query request in java? these params are mentioned in doc(https://www.elastic.co/guide/en/elasticsearch/plugins/2.3/delete-by-query-usage.html) but do not know how to add in java api!

1 Answer 1

1

You can use:

deleteRequest.setRouting(routing) // to set routing
deleteRequest.request().size(size) // to set the size
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.