常用 ES 操作汇总

查询 ES 数据

URL:http://IP:PORT/person_dynamic/_search

{
  "query": {
    "bool": {
      "must": [
        {
          "range": {
            "captureTime": {
              "gt": "2023-08-16 13:00:00",
              "lt": "2023-08-16 13:10:00"
            }
          }
        }
      ]
    }
  }
}

删除 ES 数据

URL:http://IP:PORT/person_dynamic/_delete_by_query

{
  "query": {
    "bool": {
      "must": [
        {
          "range": {
            "captureTime": {
              "gt": "2023-08-16 13:00:00",
              "lt": "2023-08-16 13:10:00"
            }
          }
        }
      ]
    }
  }
}

查询索引结构

curl --location 'http://IP:PORT/test04/_mapping'

查询所有索引库

curl --location 'http://IP:PORT/_cat/indices'



Enjoy Reading This Article?

Here are some more articles you might like to read next:

  • SNAT和DNAT
  • Clickhouse Drop表过大异常
  • Jmeter使用指南
  • Excel导入图片URL并显示图片
  • Shell命令汇总