Unhashable type: 'dict' (python)

Hello,

I keep on getting the following error message, and I am scratching my head now pretty hard. Any suggestions?

res = es.search(
				scroll = '2m',
                index = "logstash-*",
                body = {
{
  "aggs": {
    "2": {
      "terms": {
        "field": "src_ip.keyword",
        "size": 50,
        "order": {
          "1": "desc"
        }
      },
      "aggs": {
        "1": {
          "cardinality": {
            "field": "src_ip.keyword"
          }
        }
      }
    }
  },
  "size": 0,
  "_source": {
    "excludes": []
  },
  "stored_fields": [
    "*"
  ],
  "script_fields": {},
  "docvalue_fields": [
    {
      "field": "@timestamp",
      "format": "date_time"
    },
    {
      "field": "flow.start",
      "format": "date_time"
    },
    {
      "field": "timestamp",
      "format": "date_time"
    },
    {
      "field": "tls.notafter",
      "format": "date_time"
    },
    {
      "field": "tls.notbefore",
      "format": "date_time"
    }
  ],
  "query": {
    "bool": {
      "must": [
        {
          "range": {
            "@timestamp": {
              "gte": 1555777931992,
              "lte": 1558369931992,
              "format": "epoch_millis"
            }
          }
        }
      ],
      "filter": [
        {
          "match_all": {}
        }
      ],
      "should": [],
      "must_not": [],
    }
  }
}
})

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