I'm not able to find some example and I even didn't get the point if such thing is possible or I should switch to low level client (and in this case I'm wondering what the role of org.elasticsearch.index.reindex.DeleteByQueryRequest is) .
I'm using ES 6.2.3
Thanks in advance
delete by query is not supported yet by the high-level REST client. You can see which API are supported in our docs: https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-supported-apis.html .
If you use the low-level REST client instead, I don't think that DeleteByQueryRequest will help. You need to provide the request body as a string or byte array as part of an HttpEntity (that's what the apache http client calls it). Maybe for the query part you can reuse the SearchRequest or SearchSourceBuilder and print out its state using the toXContent method though.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.