You want to wrap both nested clauses in a bool-should clause. Also, given
that you're not doing any scoring here, just using group membership as a
filter, it'd be faster to use filters instead of queries:
While we're about it - you're not correlating eg group_id with created_at,
so you may want to consider adding include_in_parent: true to your nested
definitions. This will index the group_id and created_at fields in the
parent document as well, in which case the query just becomes:
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.