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:///medcl/elasticsearch-analysis-ik/issues/714