I have to index email messages, each having a list of recipients, like this:
{
"To":[{"name":"John", "email":"[email protected]"}, {"name":"Jane", "email":"[email protected]"}],
"Body": "Blah blah blah"
}
I want to search in the body texts and perform aggregations over messages that have more than one recipient only. I tried to use token_count datatype and value_count aggregation, but neither seems to be applicable. Is there a way to define a filter over multi-value counter?