search()收到了意外的关键字参数'doc_type'-在连接远程Elasticsearch时

时间:2019-09-19 07:34:32

标签: python-3.x elasticsearch flask

我正在尝试连接哪个版本的远程Elasticsearch

"version" : {
    "number" : "7.0.1",
    "build_flavor" : "default",
    "build_type" : "docker",
    "build_hash" : "e4efcb5",
    "build_date" : "2019-04-29T12:56:03.145736Z",
    "build_snapshot" : false,
    "lucene_version" : "8.0.0",
    "minimum_wire_compatibility_version" : "6.7.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  }

并且在我本地的python弹性版本中也是

elasticsearch==7.0.1

当我进行任何查询时,出现此错误-

TypeError: search() got an unexpected keyword argument 'doc_type'

我的python代码是-

res = es.search(index=brand_index, doc_type=brand, body={
            "query": {
                "match_all": {}
            }})

0 个答案:

没有答案