基于查询的删除API允许开发者基于查询删除一个或者多个索引、一个或者多个类型。下面是一个例子。

import static org.elasticsearch.index.query.FilterBuilders.*;
import static org.elasticsearch.index.query.QueryBuilders.*;

DeleteByQueryResponse response = client.prepareDeleteByQuery("test")
        .setQuery(termQuery("_type", "type1"))
        .execute()
        .actionGet();

相关文章:

  • 2021-07-21
  • 2021-09-26
  • 2022-12-23
  • 2021-07-23
  • 2021-05-29
  • 2022-12-23
  • 2021-05-23
  • 2022-12-23
猜你喜欢
  • 2022-02-21
  • 2021-08-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-22
相关资源
相似解决方案