Possible to create a facet covering multiple array fields


Suppose I have the following index comprised of 3 documents:
Field subject and level are "type": "string".

subject:["math", "geo"], level:["first"]
subject:["ang", "geo"], level:["first", "second"]
subject:["geo"], level:["second", "fourth"]

The use case requires that I retrieve a facet on subject with the
following counts:
math-first: 1
geo-first: 2

Is this possible in elasticsearch with one search?
How to do this?
Thanks for help

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.
For more options, visit https://groups.google.com/groups/opt_out.