How to log strings searched in elasticsearch

In elasticsearch how can i log and keep trace of the strings that are being searched so that i can analyse it later.
Suppose a user is searching "black shoes". How can i log this information?

Hi,

there's a workaround beeing discussed in this issue, but this will give you full queries and is a bit of a misuse of the slow query log. Usually people do this kind of logic in their application layer (its usually not a good idea to let the users of your search solution directly access ES, instead you usually have some sort of "translation" from what users type into a search box to the actual queries that are sent to ES. This is where I'd log this kind of information).

Cheers