As for the filter by timestamp, you should be able to do that with a range query.
Now, the answer to the other part of your question, it depends on exactly what you're trying to retrieve. As written, you query will return 10,000 documents with level: WARN, as well as the 10 keywords which occur most often across all documents which have level: WARN, which I suspect is not what you want.
Without knowing more exactly what you're trying to do, it's hard to make a specific recommendation, but if you want to retrieve all unique values, the Composite aggregation may be useful if eventType.keyword has a large number of unique values.
Good to hear you figured out the aggregation you need! To combine the two queries, you'll need to use a Bool Query. In your case, I think your query will end up looking something like this:
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.