Get occurrence of each word in all documents

I have a list of words. Let's say ["House","Door"].
I want for each word get the number of documents where this word occurs. I prefer to use only one query as my list can be huge.

The response could be like this :

{
"House":5,
"Door": 10,
}

Is there a way to do this with ElasticSeatch ?

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