2017-06-01 75 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

回答