Getting issue for data with nested mapping in opensearch

we are getting following error when we tried to post data to opensearch elasticsearch.

for sample data:
“testdocument”: [
{
“field1”: 856,
“field2”: 0
},
{
“field1”: 120.99,
“field2”: 0
}
]
error got was :
{“error”:{“root_cause”:[{“type”:“illegal_argument_exception”,“reason”:“mapper [testdocument.field1] cannot be changed from type [float] to [long]”}],“type”:“illegal_argument_exception”,“reason”:“mapper [testdocument.field1] cannot be changed from type [float] to [long]”},“status”:400}

above sample data is a nested one , where fieldname field1 having different datatype (float and long) it was failing to accept the above document.