title: How to have a OR search while aggregating in Elasticsearch?
body: <p>I have this query which gets the aggregation of the mentions field for all the tweets with the text "CAT DOG". How can I edit my query such that I get the aggregation for all the tweets containing either "cat" or "dog".</p>
  
  <pre><code>{
      "size": 0,
      "query": {
          "filtered": {
             "query": {
                  "match_all": {}
             },
             "filter": {"text" : "CAT DOG"}
          }
      },
      "aggs": {
          "tweet": {
              "terms": {
                  "field": "hashtags",
                  "size" : 50
              }
          }
      }
  }
  </code></pre>