elasticsearch慢查询日志

调用如下api

这是集群级别的api
/_cluster/settings/

{
  "transient": {
    "logger.index.search.slowlog": "DEBUG",
    "logger.index.indexing.slowlog" : "INFO"
  }
}


这个是索引级别的api:
/索引名/_settings/

{
    "index.search.slowlog.threshold.query.debug" : "20ms", 
    "index.search.slowlog.threshold.fetch.debug": "20ms", 
    "index.indexing.slowlog.threshold.index.info": "20ms" 
}