如何在彈性搜索中啓用搜索慢日誌。啓用搜索緩慢登錄ElasticSearch
我使用ES 5.2版本
我試圖運行下面的命令,但是這似乎並不奏效。似乎沒有任何東西寫入文件。
PUT /articles-dev-19-06-2017-15-20-48/_settings
{
"index.search.slowlog.threshold.query.warn": "10s",
"index.search.slowlog.threshold.query.info": "5s",
"index.search.slowlog.threshold.query.debug": "2s",
"index.search.slowlog.threshold.query.trace": "500ms",
"index.search.slowlog.threshold.fetch.warn": "1s",
"index.search.slowlog.threshold.fetch.info": "800ms",
"index.search.slowlog.threshold.fetch.debug": "500ms",
"index.search.slowlog.threshold.fetch.trace": "200ms",
"index.indexing.slowlog.threshold.index.warn": "10s",
"index.indexing.slowlog.threshold.index.info": "5s",
"index.indexing.slowlog.threshold.index.debug": "2s",
"index.indexing.slowlog.threshold.index.trace": "500ms",
"index.indexing.slowlog.level": "trace",
"index.indexing.slowlog.source": "100"
}
下面是對指數
{
"articles-dev-19-06-2017-15-20-48": {
"settings": {
"index": {
"search": {
"slowlog": {
"threshold": {
"fetch": {
"warn": "1s",
"trace": "200ms",
"debug": "500ms",
"info": "800ms"
},
"query": {
"warn": "10s",
"trace": "500ms",
"debug": "2s",
"info": "5s"
}
}
}
},
"indexing": {
"slowlog": {
"level": "trace",
"threshold": {
"index": {
"warn": "10s",
"trace": "500ms",
"debug": "2s",
"info": "5s"
}
},
"source": "100"
}
},
"number_of_shards": "2",
"provided_name": "advice-articles-dev-19-06-2017-15-20-48",
"creation_date": "1497885649676",