-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
NEST/Elasticsearch.Net version: 6.0.1
Elasticsearch version: 6.2.1
Description of the problem including expected versus actual behavior:
We are indexing the data containing geo-shape data.
When using JsonNetSerializer
these data are serialized incorrectly.
(Default serializer works OK.)
var point = new PointGeoShape(new GeoCoordinate(lat, lon));
With default serializer (expected):
{
"geometry": {
"type": "geometrycollection",
"geometries": [
{
"coordinates": [
49.105995,
21.9926492
],
"type": "point"
},
{
"coordinates": [
49.1017987,
21.9909713
],
"type": "point"
}
]
}
}
With JsonNetSerializer (actual):
{
"geometry": {
"type": "geometrycollection",
"geometries": [
{
"coordinates": {
"lat": 49.105995,
"lon": 21.9926492
},
"type": "point"
},
{
"coordinates": {
"lat": 49.1017987,
"lon": 21.9909713
},
"type": "point"
}
]
}
}
which produces the following error:
json_parse_exception Reason: "Current token (FIELD_NAME) not numeric, can not use numeric value accessors
at [Source: org.elasticsearch.common.bytes.BytesReference$MarkSupportingStreamInputWrapper@248dbc2c; line: 1, column: 462]
DSilence
Metadata
Metadata
Assignees
Labels
No labels