I can't think of a way this can be done at the moment (unless of course the categories are finite and you can build a massive query using combinations of them). However, you can always precompute the distinct category count per author prior to indexing and then include it as an extra field in the document and then filter it using say a range filter.
-- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/f8230ff4-e5a8-43af-91d8-d630d1422aa3%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.