Reputation: 1691
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 BigInteger values in standard notation? May be, OpenSearch able to be configured for this? Storing as strings not suitable.
Upvotes: 0
Views: 25