You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to create an index with a constant_keyword field the index is created but fails to initialize the shards. Leaving the index in a defect state.
The logs show an error like the following, giving the hint that the mandatory value attribute is missing, though it was specified when creating the index.
[2024-07-03T16:26:47,523][WARN ][o.o.c.r.a.AllocationService] [opensearch-nodes-0] failing shard [failed shard, shard [romcom_movies][0], node[ZT3MePnSSUCwmjmHl2GVPA], [P], recovery_source[new shard recovery], s[INITIALIZING], a[id=5Xd3-2t9TZSOd-04YVLWug], unassigned_info[[reason=ALLOCATION_FAILED], at[2024-07-03T16:26:47.412Z], failed_attempts[4], failed_nodes[[ZT3MePnSSUCwmjmHl2GVPA, regeJ4etSYqEWfZNO-Z4CA]], delayed=false, details[failed shard on node [regeJ4etSYqEWfZNO-Z4CA]: failed to update mapping for index, failure MapperParsingException[Failed to parse mapping [_doc]: Field [genre] is missing required parameter [value]]; nested: OpenSearchParseException[Field [genre] is missing required parameter [value]]; ], allocation_status[no_attempt]], message [failed to update mapping for index], failure [MapperParsingException[Failed to parse mapping [_doc]: Field [genre] is missing required parameter [value]]; nested: OpenSearchParseException[Field [genre] is missing required parameter [value]]; ], markAsStale [true]]
@securitym0nkey I have found the reason, the reason is we set the default value for the type incorrectly, so the value is not serialized in the cluster metadata.
Describe the bug
When trying to create an index with a constant_keyword field the index is created but fails to initialize the shards. Leaving the index in a defect state.
The logs show an error like the following, giving the hint that the mandatory value attribute is missing, though it was specified when creating the index.
[2024-07-03T16:26:47,523][WARN ][o.o.c.r.a.AllocationService] [opensearch-nodes-0] failing shard [failed shard, shard [romcom_movies][0], node[ZT3MePnSSUCwmjmHl2GVPA], [P], recovery_source[new shard recovery], s[INITIALIZING], a[id=5Xd3-2t9TZSOd-04YVLWug], unassigned_info[[reason=ALLOCATION_FAILED], at[2024-07-03T16:26:47.412Z], failed_attempts[4], failed_nodes[[ZT3MePnSSUCwmjmHl2GVPA, regeJ4etSYqEWfZNO-Z4CA]], delayed=false, details[failed shard on node [regeJ4etSYqEWfZNO-Z4CA]: failed to update mapping for index, failure MapperParsingException[Failed to parse mapping [_doc]: Field [genre] is missing required parameter [value]]; nested: OpenSearchParseException[Field [genre] is missing required parameter [value]]; ], allocation_status[no_attempt]], message [failed to update mapping for index], failure [MapperParsingException[Failed to parse mapping [_doc]: Field [genre] is missing required parameter [value]]; nested: OpenSearchParseException[Field [genre] is missing required parameter [value]]; ], markAsStale [true]]
Related component
Indexing
To Reproduce
Just run the snippet from the documentation.
The request will take a long time and finally fail with a 400 error, but the index is created.
Note when running
GET romcom_movies
the value attribute is actually missing.Expected behavior
Index gets created and works like described in the documentation.
Additional Details
Plugins
default plugins
Host/Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: