今天商品同步ES 计划任务报错:
The number of nested documents has exceeded the allowed limit of [10000].
This limit can be set by changing the [index.mapping.nested_objects.limit] index level setting.
查看该商品款式(Color,Size, ... 排列组合)较多,每个款式下都配了十几张的图片,这些款式及图片都以嵌套文档的方式写入了ES,导致写入ES的嵌套文档总数超限。
官方对 index.mapping.nested_objects.limit 的介绍:
https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-settings-limit.html
跟据官方文档描述,修改 index.mapping.nested_objects.limit 配置项即可
PUT /xxxxx
{
"settings": {
"index.mapping.nested_objects.limit": 60000,
"number_of_shards": 5,
"number_of_replicas": 2
},
"mappings": {
...
}
}
PUT xxxx/_settings
{
"index.mapping.nested_objects.limit": 60000
}