代码之家  ›  专栏  ›  技术社区  ›  Rolando

为什么我的映射有不支持的参数?

  •  0
  • Rolando  · 技术社区  · 6 年前

    我有下面的映射,它给出了最新elasticsearch的错误:

    PUT mydoctype/_mapping
    {
      "mydoctype": {
        "properties": {
              "location" : {
                "type": "geo_point"
              }
        }
      }
    }
    

    我得到以下错误。。。怎么了? “根映射定义有不支持的参数:[mydoctype:{properties={location={type=geo_point}}}]”

    0 回复  |  直到 6 年前
        1
  •  1
  •   zbusia    6 年前

    您正在使用不再受支持的映射类型。见 Removal of Mapping Type . 提出以下要求:

    PUT myindex/_mappings
    {
        "properties": {
            "location": {
                "type": "geo_point" 
            }
        }
    }