采用ik热加载字典后,需要对旧数据经行reindex,我这里调用的是
POST index/_update_by_query
{
"conflicts" :"proceed"
}
返回的是超时
{"statusCode":504,"error":"Gateway Time-out","message":"Client request timeout"}
若不用conflicts=proceed的话
{
"took" : 31593,
"timed_out" : false,
"total" : 473783,
"updated" : 32332,
"deleted" : 0,
"batches" : 33,
"version_conflicts" : 668,
"noops" : 0,
"retries" : {
"bulk" : 0,
"search" : 0
},
"throttled_millis" : 0,
"requests_per_second" : -1.0,
"throttled_until_millis" : 0,
"failures" : [
{
"index" : "index",
"type" : "_doc",
"id" : "2203092",
"cause" : {
"type" : "version_conflict_engine_exception",
"reason" : "[2203092]: version conflict, required seqNo [3597589], primary term [4]. current document has seqNo [4071372] and primary term [4]",
"index_uuid" : "3i2M-KPLTjWTUViXkwIsQA",
"shard" : "0",
"index" : "mali_prop"
},
"status" : 409
}
failures全是同样的信息
不过经测试是能reindex 分词有效果
数据我是用canal同步mysql的
请问我该如何reindex才行?
POST index/_update_by_query
{
"conflicts" :"proceed"
}
返回的是超时
{"statusCode":504,"error":"Gateway Time-out","message":"Client request timeout"}
若不用conflicts=proceed的话
{
"took" : 31593,
"timed_out" : false,
"total" : 473783,
"updated" : 32332,
"deleted" : 0,
"batches" : 33,
"version_conflicts" : 668,
"noops" : 0,
"retries" : {
"bulk" : 0,
"search" : 0
},
"throttled_millis" : 0,
"requests_per_second" : -1.0,
"throttled_until_millis" : 0,
"failures" : [
{
"index" : "index",
"type" : "_doc",
"id" : "2203092",
"cause" : {
"type" : "version_conflict_engine_exception",
"reason" : "[2203092]: version conflict, required seqNo [3597589], primary term [4]. current document has seqNo [4071372] and primary term [4]",
"index_uuid" : "3i2M-KPLTjWTUViXkwIsQA",
"shard" : "0",
"index" : "mali_prop"
},
"status" : 409
}
failures全是同样的信息
不过经测试是能reindex 分词有效果
数据我是用canal同步mysql的
请问我该如何reindex才行?
1 个回复
Ombres
赞同来自:
conflicts=proceed这个参数用来防止版本冲突导致的中断,一般出现版本冲突会直接终止整个update流程,这里的含义是跳过冲突继续执行后续更新。