2017-06-01 74 views
1

我是一個初學者的彈性搜索。我試圖添加一個分析器到我的索引。這裏是編碼:Elasticsearch指數分析器設置

PUT drug_mono6/_settings 
{ 
"analysis": { 
"analyzer": { 
    "attachment.content": { 
    "type": "custom", 
    "tokenizer": "Whitespace" 
    } 
} 
} 
} 

但是,我沒有能夠重新打開索引後,這樣做。我收到的錯誤是:

{ 
"error": { 
"root_cause": [ 
{ 
"type": "exception", 
"reason": "Failed to verify index [drug_mono6/SMmaJ4iPTCSUHp-oedsadA]" 
} 
], 
"type": "exception", 
"reason": "Failed to verify index [drug_mono6/SMmaJ4iPTCSUHp-oedsadA]", 
"caused_by": { 
"type": "illegal_argument_exception", 
"reason": "analyzer [attachment] must specify either an analyzer type, or 
a tokenizer" 
} 
}, 
"status": 500 
}` 

有沒有辦法修改設置並刪除更改?

+0

嘗試刪除索引 – Lax

+0

有沒有辦法,你可以刪除分析儀。錯誤的原因必須使用'。'。在分析器名稱中。它被認爲是ES中的嵌套路徑分割器。嘗試使用'_'代替。 – Prashant

回答