[英]Elasticsearch index analyzer settings
I am a beginner for elastic search. 我是弹性搜索的初学者。 I tried to add an analyzer to my index.
我试图将分析器添加到索引中。 Here is the coding:
这是代码:
PUT drug_mono6/_settings
{
"analysis": {
"analyzer": {
"attachment.content": {
"type": "custom",
"tokenizer": "Whitespace"
}
}
}
}
However, I was not able to reopen the index after doing that. 但是,这样做之后,我无法重新打开索引。 The error I received is:
我收到的错误是:
{
"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
}`
Is there a way to modify the settings and remove the changes? 有没有办法修改设置并删除更改?
this should work 这应该工作
PUT drug_mono6
{
"analysis": {
"analyzer": {
"attachment": {
"type": "custom",
"tokenizer": "whitespace"
}
}
}
}
https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-custom-analyzer.html https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-custom-analyzer.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.