BulkAll halted after receiving failures that can not be retried from _bulk 的解决办法
问题
迁移寻古诗词网时,ElasticSearch 由 7.8 升级到 8.7 了。使用 BulkAll 索引数据时,会报错误:BulkAll halted after receiving failures that can not be retried from _bulk
解决办法
目前最新的的Nest版本是7.17.5,通过调用 .EnableApiVersioningHeader() 启用兼容模式即可解决
IConnectionPool pool = new SingleNodeConnectionPool(new Uri("http://localhost:9200"));
var settings = new ConnectionSettings(pool)
.EnableApiVersioningHeader();