我是 flex 搜索的初学者。我试图将分析器添加到索引中。这是代码:
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
}`
有没有办法修改设置并删除更改?
最佳答案
这应该工作
PUT drug_mono6
{
"analysis": {
"analyzer": {
"attachment": {
"type": "custom",
"tokenizer": "whitespace"
}
}
}
}
https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-custom-analyzer.html
关于elasticsearch - Elasticsearch索引分析器设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44317321/