es 5.4.2 在已有索引上自定义词性分析器,必须要先关掉索引吗,能不关掉索引的情况下,新增自定义分析器吗
Elasticsearch | 作者 fengxue | 发布于2018年09月25日 | 阅读数:3786
PUT doctest/_settings
{
"index": {
"analysis": {
"analyzer": {
"comma": {
"type": "pattern",
"pattern": ","
}
}
}
}
}
提示{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Can't update non dynamic settings [[index.analysis.analyzer.comma.pattern, index.analysis.analyzer.comma.type]] for open indices [[doctest/k1ydiwt1QbiPpZ-d-1pZmw]]"
}
],
"type": "illegal_argument_exception",
"reason": "Can't update non dynamic settings [[index.analysis.analyzer.comma.pattern, index.analysis.analyzer.comma.type]] for open indices [[doctest/k1ydiwt1QbiPpZ-d-1pZmw]]"
},
"status": 400
}
{
"index": {
"analysis": {
"analyzer": {
"comma": {
"type": "pattern",
"pattern": ","
}
}
}
}
}
提示{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Can't update non dynamic settings [[index.analysis.analyzer.comma.pattern, index.analysis.analyzer.comma.type]] for open indices [[doctest/k1ydiwt1QbiPpZ-d-1pZmw]]"
}
],
"type": "illegal_argument_exception",
"reason": "Can't update non dynamic settings [[index.analysis.analyzer.comma.pattern, index.analysis.analyzer.comma.type]] for open indices [[doctest/k1ydiwt1QbiPpZ-d-1pZmw]]"
},
"status": 400
}
3 个回复
rochy - rochy_he
赞同来自:
推荐你按照新的配置新建一个索引,然后借助 reindex 同步数据
zyb1994111
赞同来自:
aa1356889
赞同来自: