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
{{ message }}
This repository was archived by the owner on Jan 12, 2023. It is now read-only.
Can I get help for creating json object for geo shape. When tried to create json object for geo shape "polygon" with coordinates [[ [ 4.92, 52.40 ], [ 4.92, 52.30 ],[ 5.02, 52.30 ], [ 5.02, 52.40 ], [ 4.92, 52.40 ]]]. The ejson is throwing error :
** exception error: no case clause matching {error,"coordinates",throw,
{invalid_list_item,[[4.92,52.4],
[4.92,52.3],
[5.02,52.3],
[5.02,52.4],
[4.92,52.4]]}}
in function ejson_encode:convert/5 (src/ejson_encode.erl, line 80)
in call from ejson_encode:encode1/3 (src/ejson_encode.erl, line 53)
in call from ejson_encode:record_rule/5 (src/ejson_encode.erl, line 204)
in call from ejson_encode:convert/5 (src/ejson_encode.erl, line 80)
in call from ejson_encode:encode1/3 (src/ejson_encode.erl, line 53)
in call from ejson_encode:encode/3 (src/ejson_encode.erl, line 32)
in call from ejson:to_json/3 (src/ejson.erl, line 82)
in call from elasticsearch:add_new_entry/6 (src/elasticsearch.erl, line 108
The json document format is given below:
-json({document, {record, "geo_shape"},{string, "tag"},{ string, "geo_address"}}).
-json({geo_shape_location, {string, "type"}, {list, "coordinates"}}).