如何在Elasticsearch中获取搜索历史记录? [英] How to get the search History in Elasticsearch?

查看:176
本文介绍了如何在Elasticsearch中获取搜索历史记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有任何方法可以在 Elasticsearch 中获取搜索历史记录.在此,我想获取客户在过去一个月中搜索到的搜索查询.

There is any way to get the search history in Elasticsearch. In this I want to get the search queries which are searched by customers in last one month.

推荐答案

ES中没有这样的东西,您需要自己记录查询.但是,有一个名为

There's no such thing in ES, you need to log the queries yourself. However, there's a feature called slowlog which will log queries whose execution time goes above a certain threshold. You may lower that threshold to 0ms so that all queries get logged, but it is not meant for that purpose in the first place. You need to try it out and see how it works for you.

这篇关于如何在Elasticsearch中获取搜索历史记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆