# Simple way to get a stream of all search terms posted to the elasticserver

**URL:** <https://discuss.elastic.co/t/simple-way-to-get-a-stream-of-all-search-terms-posted-to-the-elasticserver/36771>\
**Category:** Elasticsearch\
**Created:** [December 9, 2015, 4:47pm UTC](https://discuss.elastic.co/t/simple-way-to-get-a-stream-of-all-search-terms-posted-to-the-elasticserver/36771 "2015-12-09T16:47:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kayaj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kayaj/32/6521_2.png) [@kayaj](https://discuss.elastic.co/u/kayaj)\
**Post date:** [December 9, 2015, 4:47pm UTC](https://discuss.elastic.co/t/simple-way-to-get-a-stream-of-all-search-terms-posted-to-the-elasticserver/36771/1 "2015-12-09T16:47:35Z")

</div>

hey folks!  
I'm completely new to elastic but I already love it.  
I'm using it in combination with a magento webshop.

What would be the best practice of getting a stream or any connection to the elasticsearch server to get all the search queries posted to the server?

(I want to display the search queries on a dot matrix display.)

Thank you for your answers in advance!

Best

---

<div class="post-metadata">

**Author:** ![ebuildy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ebuildy/32/6070_2.png) [@ebuildy](https://discuss.elastic.co/u/ebuildy)\
**Post date:** [December 9, 2015, 6:07pm UTC](https://discuss.elastic.co/t/simple-way-to-get-a-stream-of-all-search-terms-posted-to-the-elasticserver/36771/2 "2015-12-09T18:07:32Z")

</div>

Hello,

What you need is an access.log, I am not sure this is possible with ES.

But you could add a Nginx as a proxy, and configure access log to it.

Or the best is to log queries within your Php application.

---

<div class="post-metadata">

**Author:** ![kayaj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kayaj/32/6521_2.png) [@kayaj](https://discuss.elastic.co/u/kayaj)\
**Post date:** [December 9, 2015, 6:29pm UTC](https://discuss.elastic.co/t/simple-way-to-get-a-stream-of-all-search-terms-posted-to-the-elasticserver/36771/3 "2015-12-09T18:29:13Z")

</div>

Hey Thomas

Thank you for responding.  
So first you mean i should create a logfile and tail this file to my service.

Is ES generating logs or are there any other plugins needed such als LogStash?

Best  
Jakob

---

<div class="post-metadata">

**Author:** ![ebuildy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ebuildy/32/6070_2.png) [@ebuildy](https://discuss.elastic.co/u/ebuildy)\
**Post date:** [February 10, 2016, 12:20pm UTC](https://discuss.elastic.co/t/simple-way-to-get-a-stream-of-all-search-terms-posted-to-the-elasticserver/36771/4 "2016-02-10T12:20:27Z")

</div>

Nop you must write it!

This could be a very nice feature, log all queries sent with some stat (ressources consumed, duration, hits ...).

According your queries volume, you could simply use Php error\_log method to append queries to file. (Or another elasticsearch ^^ index).

---

<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:** [July 5, 2017, 11:17pm UTC](https://discuss.elastic.co/t/simple-way-to-get-a-stream-of-all-search-terms-posted-to-the-elasticserver/36771/5 "2017-07-05T23:17:37Z")

</div>


