title: Elasticsearch: Data too large, data for [_uid] would be larger than limit of [1267571097/1.1gb]]
body: <p>I'm trying to query elasticsearch to retrieve some document that got the keyword <code>#test</code> in their documents. The <code>all_hateful_ids</code> is a list of id. When I send this query to elasticsearch I've got the following error.</p>
  
  <pre><code>query = {
    "size": 100,
    "_source": "text",
    "query": {
      "function_score": {
        "query": {
          "bool": {
              "filter": [
                  {"terms": {"id_tweet_creator": all_hateful_ids}}
              ],
            "should": [
              {"match": {
                "text": "#test"
              }}
            ],
            "must_not": [
              {"exists": {"field": "retweeted_status"}}
            ]
          }
        },
        "functions": [
          {
            "random_score": {}
          }
        ]
      }
    }
  }
  
  
  elasticsearch.exceptions.TransportError: TransportError(500, 'search_phase_execution_exception', 'java.util.concurrent.ExecutionException: CircuitBreakingException[[fielddata] Data too large, data for [_uid] would be larger than limit of [1267571097/1.1gb]]')
  </code></pre>
  
  <p>The problem is that if I remove the filter key, then my query is answered. Why? A filter should reduce the amount of data, so there is no way than my elasticsearch doesn't have enough memory to process without the filter field but get a memory problem with the filter. How can I solve this problem? </p>