2016-10-28 42 views
1

当我尝试更新我的索引,并添加从方法copy_to创造了一个新的领域(见http://pastebin.com/T7GcHSXj),我得到这个错误,我不明白:更新映射在我的索引(elasticsearch 1.4)

“错误”:“MapperParsingException [根类型映射后 解析剩余字段不为空:[映射: {tInfoclient = {属性= {客户= {属性= {d_naiss_cli = {类型=串, copy_to = FULL-INFO },pr_cli_20 = {type = string,copy_to = full_info}, nom_cli_20 = {type = string,copy_to = full_info},full_info = {type = string}, dc_cli = {format = dateOptionalTime,type = date}, no_coEmprunteur = {type = string},cmpl_voie_cli = {type = string}, loc_cli = {type = string},no_tel_cli = {type = string}, no_ctrat = {type = string},no_tel_empcli = {type = string} , voie_cli = {type = string},c_post_cli = {type = string}, c_qual = {type = string},ad_e_mail = {type = string},no_telp = {type = string}, ptel_empcli = {type = string }}}}}}]]”, “状态”:400}

我跟着从网站上的文档,但没有线索: https://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-put-mapping.html https://www.elastic.co/guide/en/elasticsearch/guide/1.x/custom-all.html

回答

1

当updati NG的映射类型,您需要删除mappings部分,因为那些在URL中已指定的类型名称:

curl -XPUT 'http://maprvm:9200/maprdb/_mapping/tInfoclient' -d '{ 
      "properties": { 
       "Client": { 
        "properties": { 
         "d_naiss_cli": { 
          "type": "string", 
          "copy_to": "full_info" 
         }, 
         "pr_cli_20": { 
          "type": "string", 
          "copy_to": "full_info" 
         }, 
         "nom_cli_20": { 
          "type": "string", 
          "copy_to": "full_info" 
         }, 
         "full_info": { 
          "type":  "string" 
         }, 
         "dc_cli": { 
          "format": "dateOptionalTime", 
          "type": "date" 
         }, 
         "no_coEmprunteur": { 
          "type": "string" 
         }, 
         "cmpl_voie_cli": { 
          "type": "string" 
         }, 
         "loc_cli": { 
          "type": "string" 
         }, 
         "no_tel_cli": { 
          "type": "string" 
         }, 
         "no_ctrat": { 
          "type": "string" 
         }, 
         "no_tel_empcli": { 
          "type": "string" 
         }, 
         "voie_cli": { 
          "type": "string" 
         }, 
         "c_post_cli": { 
          "type": "string" 
         }, 
         "c_qual": { 
          "type": "string" 
         }, 
         "ad_e_mail": { 
          "type": "string" 
         }, 
         "no_telp": { 
          "type": "string" 
         }, 
         "ptel_empcli": { 
          "type": "string" 
         } 
        } 
       } 
      } 

}' 
+0

我会接受这个答案时,将有可能......感觉不好的时候我误读了文件:/ – kulssaka

相关问题