2016-10-28 43 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

相關問題