DeleteByQueryRequest deleteRequest = new DeleteByQueryRequestyour_index_name;deleteRequestsetQueryQueryBuildersmatchAllQuery;deleteReques找不到setQuery
I apologize for the error in my previous response. The correct way to set the query for a DeleteByQueryRequest in Elasticsearch is as follows:
DeleteByQueryRequest deleteRequest = new DeleteByQueryRequest("your_index_name");
deleteRequest.setQuery(QueryBuilders.matchAllQuery());
This code will create a DeleteByQueryRequest object for the specified index name and set the query to match all documents in the index.
原文地址: https://www.cveoy.top/t/topic/iKSo 著作权归作者所有。请勿转载和采集!