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
Describe the bug
OS does not allow to update date_range fields with exact same mapping settings and responds with 500.
That is known issue for ElasticSearch version 7.10 which OpenSearch used for fork. It was resolved in version 7.11. Link to issue created for ElasticSearch -> elastic/elasticsearch#69012
To Reproduce
Steps to reproduce the behavior:
Create an index curl -XPUT http://localhost:9200/test_index
Add a mapping for the field with date_range type. curl -XPUT http://localhost:9200/test_index/_mapping \ -H 'Content-Type: application/json' \ -d '{"properties": {"range": {"type": "date_range", "format": "yyyy-MM-dd"}}}'
Update the same field using the same mapping settings - repeat the previous request
curl -XPUT http://localhost:9200/test_index/_mapping \
-H 'Content-Type: application/json' \
-d '{"properties": {"range": {"type": "date_range", "format": "yyyy-MM-dd"}}}'
#response:
{
"error" : {
"root_cause" : [
{
"type" : "illegal_state_exception",
"reason" : "[index.version.created] is not present in the index settings for index with UUID [null]"
}
],
"type" : "illegal_state_exception",
"reason" : "[index.version.created] is not present in the index settings for index with UUID [null]"
},
"status" : 500
}
Expected behavior
Should allow to update existed mapping.
Plugins
No extra plugins
Host/Environment (please complete the following information):
OpenSearch version 1.2.3 and 1.1.0
Additional context
We encountered that issue during using the dynamic_templates feature in combination with date_range fields. Under the hood, the Dynamic templates feature performs the same field mapping update, but implicitly, while indexing a new document.
Issue might be fixed in 7.11 version as part of this refactoring elastic/elasticsearch#64635
The text was updated successfully, but these errors were encountered:
Describe the bug
OS does not allow to update date_range fields with exact same mapping settings and responds with 500.
That is known issue for ElasticSearch version 7.10 which OpenSearch used for fork. It was resolved in version 7.11. Link to issue created for ElasticSearch -> elastic/elasticsearch#69012
To Reproduce
Steps to reproduce the behavior:
Create an index
curl -XPUT http://localhost:9200/test_index
Add a mapping for the field with date_range type.
curl -XPUT http://localhost:9200/test_index/_mapping \ -H 'Content-Type: application/json' \ -d '{"properties": {"range": {"type": "date_range", "format": "yyyy-MM-dd"}}}'
Update the same field using the same mapping settings - repeat the previous request
Expected behavior
Should allow to update existed mapping.
Plugins
No extra plugins
Host/Environment (please complete the following information):
Additional context
We encountered that issue during using the dynamic_templates feature in combination with date_range fields. Under the hood, the Dynamic templates feature performs the same field mapping update, but implicitly, while indexing a new document.
Issue might be fixed in 7.11 version as part of this refactoring elastic/elasticsearch#64635
The text was updated successfully, but these errors were encountered: