Nested Filter & Nested Aggregation don't work together

Am I misunderstanding the Nested Filter? I expected it to exclude any
nested objects that didn't match it (and subsequently not match them in any
nested aggregations for the same path).

Example:
I have a field "foo" with a mapping type of "nested".

I execute a mach-all query with a Nested Terms Filter where the field
"foo.bar" is "value1".
I also add a Nested terms aggregation on for the same field.

The problem is that the aggregation returns things other than "value1"!
It will return "value2" if other nested objects in the same document had
foo.bar=value1.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b26d172f-38ab-4b6f-880c-053c12a2700f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.