1
0
Fork 0
arangodb/Documentation/Examples/RestSimpleNearDistance.gene...

48 lines
1.1 KiB
Plaintext

shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/near
{ "collection": "products", "latitude" : 0, "longitude" : 0, "skip" : 1, "limit" : 3, "distance" : "distance" }
HTTP/1.1 201 Created
content-type: application/json; charset=utf-8
{
"result" : [
{
"_id" : "products/1330079190",
"_key" : "1330079190",
"_rev" : "1330079190",
"name" : "Name/-0.002/",
"loc" : [
-0.002,
0
],
"distance" : 222.38985328911744
},
{
"_id" : "products/1330472406",
"_key" : "1330472406",
"_rev" : "1330472406",
"name" : "Name/0.002/",
"loc" : [
0.002,
0
],
"distance" : 222.38985328911744
},
{
"_id" : "products/1329882582",
"_key" : "1329882582",
"_rev" : "1329882582",
"name" : "Name/-0.004/",
"loc" : [
-0.004,
0
],
"distance" : 444.779706578235
}
],
"hasMore" : false,
"count" : 3,
"error" : false,
"code" : 201
}