How can I make ElasticSearch only return hits containing my aggregation filter. Basically I only want to see hits/results that contain the event_names that show up in my aggregations. Please help.
To answer your first question, it is not possible to have queries that
cross reference other documents. In this case, it would help to denormalize
your data, and to have your event objects as nested objects [1].
You can bring related events together using an entity centric indexing approach
Nested docs are not necessary as long as your queries don't test >1 property in each event object (your example was only testing a single property "event_name"). The event names could live in a simple string array.
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.