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
I apologize, if this is not the correct place to post this. When I set facets with int(1) value it stored as float (1.000000). It's perfectly fine if I post or query with HTTP
response: {"me":[{"weight":[{"uid":"0x1053b2","weight|score":1.000000}]}]}
with error json: cannot unmarshal number 1.000000 into Go struct field weight of type int
The text was updated successfully, but these errors were encountered:
Since the mutation input is in JSON format which doesn't differentiate between INT/FLOAT (everything is a number), the server gets a float and stores the facet as such. This is, unfortunately, a limitation of the JSON format and the fact that facets don't have a fixed type.
I would recommend setting a property on a node (instead of facet) if the type is important to you or using the RDF mutation format.
I apologize, if this is not the correct place to post this. When I set facets with int(1) value it stored as float (1.000000). It's perfectly fine if I post or query with HTTP
marshal string:
{"uid":"0x9c6711","weight":[{"uid":"0x1053b2","weight|score":1}]}
response:
{"me":[{"weight":[{"uid":"0x1053b2","weight|score":1.000000}]}]}
with error
json: cannot unmarshal number 1.000000 into Go struct field weight of type int
The text was updated successfully, but these errors were encountered: