Only the documents which match all 4 of those clauses should be returned, which works great. Now, I have seen, that all Indices get queried, not only the newest one. This causes quite some load. According to this, the order of the clauses is determined by elasticsearch itself.
Can I influence this execution order somehow? i.e. I would like to execute the @timestamp-range clause first. Maybe a nested bool query...? And how does this work then? I don't see the sense in querying all of the indices because the needed documents clearly are in the newest one (or two) indices.
This was, because the range-clause with the @timestamp-filter was executed later than some other clauses in the bool query.
To mitigate this issue, i'm querying the newest two indices (to include the edge cases around midnight) with the help of some date-math from logstash. In my case, with elasticsearch, the elasticsearch-filter looks something like this now:
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.