2017-08-01 35 views
1

我是Elasticsearch的新手。我已經嘗試了Stack Overflow和其他網站上提供的不同解決方案,但他們沒有爲我工作,這就是爲什麼我發佈這個問題。根映射定義具有不受支持的參數(mapper_parsing_exception)

我想補充分詞「:‘uax_url_email’,這樣我可以輕鬆地搜索電子郵件查詢

但是,當我設置的映射其彈性搜索是給我這個錯誤:

Root mapping definition has unsupported parameters (mapper_parsing_exception)

我試圖刪除索引,然後重新創建它,但它也沒有幫助。

我的映射鏈接。

http://localhost:9200/users/user/_mapping

{ 
"settings": { 
      "analysis": { 
       "analyzer": { 
        "urls-links-emails": { 
         "type": "custom", 
         "tokenizer": "uax_url_email" 
        } 
       } 
      } 
     }, 
     "mappings":{ 
      "user": { 
       "properties": { 
        "id" : {"type": "long"}, 
        "first_name" : {"type": "text"}, 
        "middle_name" : {"type": "text"}, 
        "last_name" : {"type": "text"}, 
        "full_name" : {"type": "text"}, 
        "image" : {"type": "text"}, 
        "email" : {"type": "text", "analyzer": "urls-links-emails"}, 
        "mobile_number" : {"type": "text"}, 
        "profile_image" : {"type": "text"}, 
        "thumbnail" : {"type": "text"}, 
        "role" : {"type": "text"}, 
        "role_id" : {"type": "byte"}, 
        "joined_date" : {"type": "date", "format": "yyyy-MM-dd HH:mm:ss"}, 
        "updated_date" : {"type": "date", "format": "yyyy-MM-dd HH:mm:ss"} 
       } 
      } 
     } 
    } 
+0

我測試你的JSON與本地主機:9200/test1的PUT請求,它的工作原理(版本5.5.1)。 – MartinSchulze

+0

感謝@MartinSchulze的回覆,但它仍然不適用於我:(我的彈性搜索版本也是5.5 –

+0

請顯示請求。您是否有正確的地址?它必須是http://的PUT請求localhost:9200/users – MartinSchulze

回答

相關問題