If you are trying to avoid scripting then I imagine you are worried about the performance of this query. If so, then regular expressions probably aren't going to be the best, but you can do this with a regex in the "filters" aggregation.
If regexp is still too slow, I suggest pre-processing the logs with something like logstash to extract the bit of data you are trying to understand (maybe the path of the url?)
You are right i was afraid of the performance of the query with a script and i wished to avoid adding a logstash filter.
I will try with the filter and if it didn't work i will make some tests with scripting.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.