elasticsearch7 遇到異常代碼片段
doc/1?timeout=1m],%20status%20line%20[HTTP/1.1%20400%20Bad%20Request]
{
"error": {
"root_cause": [{
"type": "illegal_argument_exception",
"reason": "startOffset must be non-negative, and endOffset must be >= startOffset, and offsets must not go backwards startOffset=10,endOffset=14,lastStartOffset=20 for field 'content.ikfpy'"
}],
"type": "illegal_argument_exception",
"reason": "startOffset must be non-negative, and endOffset must be >= startOffset, and offsets must not go backwards startOffset=10,endOffset=14,lastStartOffset=20 for field 'content.ikfpy'"
},
"status": 400
}
不同版本的elasticsearch對應不同的分詞器,儘量不要去混合使用。
解決:https://github.com/medcl/elasticsearch-analysis-ik/issues/714