Aggregations bucket filters - must contain _type logic

Im trying to filter my aggs results buckets to only ones that contain both types of _docs being searched.

I'm new to ES, and am querying http://localhost:4571/_all/example_1,example_2/_search, and setting size: 0, as Im only interested in grouped results where result of example_1:uuid value and example_2:uuid value are the same.

This is all working great, thanks for that. But I can't work out how to filter the buckets, that MUST container a _type of example_1 and have 2 docs (ie. also contains example_2).

Sorry if this is not clear. to re-state, Im not interested in any responses of example_2 that dont have a corresponding example_1 document in it's bucket.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.