Fetch search history from cluster in Elasticsearch 7.5

I need to show all search history in front-end.Is there any api to fetch all search history in Elasticsearch 7.5?

Queries aren't normally logged, but there is a slow-log for queries that take over a specified time limit. This is hacked to log all queries by setting the time limit to a very small value.

Here is a blog.

The filebeat elasticsearch module can ingest the slowlogs, so that would make them easily accessed.

Use caution, you are creating a feedback loop, queries generate more log events for their own query.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.