title: ElasticSearch group by documents field and count occurences
body: <p>My ElasticSearch 6.5.2 index look likes:</p>
  
  <pre><code>      {
      "_index" : "searches",
      "_type" : "searches",
      "_id" : "cCYuHW4BvwH6Y3jL87ul",
      "_score" : 1.0,
      "_source" : {
        "querySearched" : "telecom",
      }
    },
    {
      "_index" : "searches",
      "_type" : "searches",
      "_id" : "cSYuHW4BvwH6Y3jL_Lvt",
      "_score" : 1.0,
      "_source" : {
        "querySearched" : "telecom",
      }
    },
    {
      "_index" : "searches",
      "_type" : "searches",
      "_id" : "eCb6O24BvwH6Y3jLP7tM",
      "_score" : 1.0,
      "_source" : {
        "querySearched" : "industry",
      }
  </code></pre>
  
  <p>And I would like a query that return this result:</p>
  
  <pre><code>"result": 
  {
  "querySearched" : "telecom",
  "number" : 2
  },
  {
  "querySearched" : "industry",
  "number" : 1
  }
  </code></pre>
  
  <p>I just want to group by occurence and get number of each, limit to ten biggest numbers. I tried with aggregations but bucket is empty.
  Thanks!</p>