Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the search History in 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.

like image 863
Tomas Avatar asked Oct 19 '25 10:10

Tomas


1 Answers

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.

like image 56
Val Avatar answered Oct 22 '25 01:10

Val



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!