How to have Range and Match query in one elastic search query using python? How to have Range and Match query in one elastic search query using python? elasticsearch elasticsearch

How to have Range and Match query in one elastic search query using python?


You need to do it like this using a bool/must query

res = es.search(index="dummy", body={  "from": 0,  "size": 0,  "query": {    "bool": {      "must": [        {          "range": {            "key": {              "gte": "1000"            }          }        },        {          "match": {            "word": "sky"          }        }      ]    }  }})