Version:
2.14.0
Describe the issue:
I have this template:
{
"index_patterns": [
"contexts-*",
"context"
],
"version": 1,
"template": {
"aliases": {
"contexts": {}
},
"mappings": {
"dynamic": "false",
"properties": {
"id": {
"type": "keyword"
},
"context": {
"type": "nested",
"properties": {
"dynamic": {
"type": "object"
}
}
}
}
}
}
}
Field context
is nested object. Some values may be BigDecimal.
I trying to insert document with BigDecimal values:
OpenSearch: 2.14.0
I have this template:
{
"index_patterns": [
"contexts-*",
"context"
],
"version": 1,
"template": {
"aliases": {
"contexts": {}
},
"mappings": {
"dynamic": "false",
"properties": {
"id": {
"type": "keyword"
},
"context": {
"type": "nested",
"properties": {
"dynamic": {
"type": "object"
}
}
}
}
}
}
}
Field context
is nested object. Some values may be BigDecimal.
I trying to insert document with BigDecimal values:
PUT test-contexts-test/_doc/1
{
"doc": {
"id": "lIj0UW9DkyDcZwKkGYkErUnGKMxAUOgo",
"context": {
"paramDEPOMNS": -9388376871237831235432123123897817236837128398127315,
"paramDEPO": 9388376871237831235432123123897817236837128398127315,
"paramEKS": true,
"paramCREDO": 6788376871237831235432123123897817236837128398127312.75,
"paramCREDOMNS": -6788376871237831235432123123897817236837128398127312.75
}
}
}
Stored document is:
{
"_index": "test-contexts-test",
"_id": "1",
"_score": 1,
"_source": {
"doc": {
"id": "lIj0UW9DkyDcZwKkGYkErUnGKMxAUOgo",
"context": {
"paramDEPOMNS": -9388376871237831235432123123897817236837128398127315,
"paramDEPO": 9388376871237831235432123123897817236837128398127315,
"paramEKS": true,
"paramCREDO": 6.788376871237831e+51,
"paramCREDOMNS": -6.788376871237831e+51
}
}
}
}
As we see, BigInteger values stored in standard notation, but BigDecimal values stored in scientific notation.
How to store BigDecimal values in standard notation?