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
Hi, I have a problem with scientific notation numbers returned from elastic through _search/_get and _msearch/_mget.
Value in elastic _source is = 1.4778125E7.
Queried through dev console is always returned the same = 1.4778125E7. For _search/_get and _msearch/_mget.
But through client _msearch/_mget calls, results return the value as Integer 14778125.
I can't provide exact code, but the problem with deserialized code happens with:
publicclassTrade {
@JsonProperty("Definition")
@NotNullprivateTradeDefinitiondefinition = newTradeDefinition(); //Where this value is stored
}
publicclassTradeDefinitionextendsHashMap<String, Object> {}
Call to api is done with basic pointing to id and providing Trade.class as tDocumentClass.
After some debugging, I can say that there are used different deserialization implementations:
for _search/_get calls co.elastic.clients.json.ObjectDeserializer works correctly, returning the value with scientific notation and as Double.
for _msearch/_mget I can tell that this number is deserialized by co.elastic.clients.json.UnionDeserializer and in one moment the value pops up as JsonBigDecimalNumber, losing the notation.
I'm using the default JacksonJsonpMapper from the package. I tried to disable DeserializationFeature.ACCEPT_FLOAT_AS_INT but nothing changed.
The text was updated successfully, but these errors were encountered:
Hi, I have a problem with scientific notation numbers returned from elastic through _search/_get and _msearch/_mget.
Value in elastic _source is = 1.4778125E7.
Queried through dev console is always returned the same = 1.4778125E7. For _search/_get and _msearch/_mget.
But through client _msearch/_mget calls, results return the value as Integer 14778125.
I can't provide exact code, but the problem with deserialized code happens with:
Call to api is done with basic pointing to id and providing Trade.class as tDocumentClass.
After some debugging, I can say that there are used different deserialization implementations:
I'm using the default JacksonJsonpMapper from the package. I tried to disable
DeserializationFeature.ACCEPT_FLOAT_AS_INT
but nothing changed.The text was updated successfully, but these errors were encountered: