strict_dynamic_mapping_exception: strict_dynamic_mapping_exception: mapping set to strict, dynamic introduction of [...] within [...] is not allowed
Elasticsearch의미
인덱스 또는 객체 매핑이 "dynamic": "strict"로 설정되어 있어, 매핑에 정의되지 않은 새 필드를 포함한 문서가 거부되었다. strict 모드는 스키마 밖의 필드가 조용히 추가되는 것을 막는다.
원인
매핑이 dynamic:strict인 상태에서 매핑에 없는 필드(오타, 새 필드, 예상치 못한 필드)를 문서에 보냄. 대개 스키마 통제를 엄격히 유지하기 위한 의도적인 안전장치이다.
해결 방법
문서의 추가 필드나 오타 필드를 수정하거나 제거한다. 필드가 실제로 필요하다면 먼저 매핑에 추가한다: PUT /index-name/_mapping {"properties": {"new_field": {"type": "..."}}}. 새 필드가 자동으로 추가되기를 원하면 dynamic을 "true"로, 저장은 하되 인덱싱하지 않으려면 "false"로 설정한다. 스키마 규율을 지키기 위해 strict 모드는 의도적으로 사용한다.
같은 데이터베이스의 다른 항목
- high_disk_watermark_exceededhigh disk watermark [90%] exceeded / flood stage disk watermark [95%] exceeded
- 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
- search_phase_execution_exceptionsearch_phase_execution_exception: all shards failed / Failed to execute phase [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)