# Fetch search history from cluster in Elasticsearch 7.5

**URL:** https://discuss.elastic.co/t/fetch-search-history-from-cluster-in-elasticsearch-7-5/216431
**Category:** Elasticsearch
**Created:** [January 24, 2020, 2:05pm UTC](https://discuss.elastic.co/t/fetch-search-history-from-cluster-in-elasticsearch-7-5/216431 "2020-01-24T14:05:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Palani\_rajan\_Ravicha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/palani_rajan_ravicha/32/61383_2.png) [@Palani\_rajan\_Ravicha](https://discuss.elastic.co/u/Palani_rajan_Ravicha)
#### Post date: [January 24, 2020, 2:05pm UTC](https://discuss.elastic.co/t/fetch-search-history-from-cluster-in-elasticsearch-7-5/216431/1 "2020-01-24T14:05:14Z")

</div>

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

---

<div class="post-metadata">

### Author: ![rugenl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rugenl/32/12887_2.png) [@rugenl](https://discuss.elastic.co/u/rugenl)
#### Post date: [January 24, 2020, 3:16pm UTC](https://discuss.elastic.co/t/fetch-search-history-from-cluster-in-elasticsearch-7-5/216431/2 "2020-01-24T15:16:05Z")

</div>

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](http://blog.florian-hopf.de/2016/03/logging-requests-to-elasticsearch.html).

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.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [February 21, 2020, 3:16pm UTC](https://discuss.elastic.co/t/fetch-search-history-from-cluster-in-elasticsearch-7-5/216431/3 "2020-02-21T15:16:08Z")

</div>

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