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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With