Reputation: 797
I have next dynamic template for type:
"dynamic_templates" : [
{
"$r_as_float" : {
"match" : "*$r",
"mapping" : {
"type" : "float"
}
}
}
]
When I try to create new document:
curl -XPOST es-1:9200/mydataspace_001001/type/276121/_create -d '
{
"kbk$r": 17404121130190019244,
}
I receive next error:
{"type":"illegal_state_exception","reason":"No matching token for number_type [BIG_INTEGER]"}
I have no this error when "kbk$r": 17404
for example.
Upvotes: 1
Views: 1644
Reputation: 217474
A float
can only take a single-precision 32-bit IEEE 754 floating point and 17404121130190019244 is way over that limit.
You need to either use a double
or a long
type instead of float
. See the different numeric types at your disposal.
Upvotes: 2