strict_dynamic_mapping_exception: strict_dynamic_mapping_exception: mapping set to strict, dynamic introduction of [...] within [...] is not allowed(mapping 设为 strict,不允许动态添加字段)
Elasticsearch含义
由于索引或对象的 mapping 设为 "dynamic": "strict",包含 mapping 中未定义新字段的文档被拒绝。strict 模式可防止 schema 之外的字段被静默添加。
原因
在 mapping 为 dynamic:strict 时,文档中发送了 mapping 中不存在的字段(拼写错误、新字段、意外字段)。这通常是为严格控制 schema 而有意设置的保护措施。
解决方法
修正或删除文档中多余/拼写错误的字段。如果确实需要该字段,先将其添加到 mapping:PUT /index-name/_mapping {"properties": {"new_field": {"type": "..."}}}。如果希望自动添加新字段,将 dynamic 设为 "true";如果希望存储但不索引,设为 "false"。有意识地使用 strict 模式以保持 schema 规范。
同一数据库的其他条目
- high_disk_watermark_exceededhigh disk watermark [90%] exceeded / flood stage disk watermark [95%] exceeded(超过磁盘 high 水位线 [90%] / flood stage 水位线 [95%])
- circuit_breaking_exceptionCircuitBreakingException[[parent] Data too large, data for [<...>] would be [...], which is larger than the limit of [...]](数据过大,超过熔断器限制)
- mapper_parsing_exceptionmapper_parsing_exception: failed to parse field [...] of type [...](无法解析类型为 [...] 的字段 [...])
- illegal_argument_exception_fielddataillegal_argument_exception: Fielddata is disabled on text fields by default. Set fielddata=true on [your_field] in order to load fielddata in memory(text 字段默认禁用 fielddata)
- search_phase_execution_exceptionsearch_phase_execution_exception: all shards failed / Failed to execute phase [query](所有分片均失败 / 执行 [query] 阶段失败)
- too_many_clausestoo_many_clauses: maxClauseCount is set to 1024 (query contains too many clauses)(查询包含的子句过多)
- version_conflict_engine_exceptionversion_conflict_engine_exception: [_doc][id]: version conflict, current version [x] is different than the one provided [y] (HTTP 409)(版本冲突,当前版本与提供的版本不同)