1
0
Fork 0

geo indexes

This commit is contained in:
Frank Celler 2012-05-03 14:14:48 +02:00
parent 3812c8ffa5
commit a9d2413de6
2 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,30 @@
> curl --data @- -X PUT --dump - http://localhost:8529/_api/simple/near
{ "collection" : "11172897562", "latitude" : 0, "longitude" : 0, "skip" : 1, "limit" : 2 }
HTTP/1.1 201 Created
content-type: application/json
{
"hasMore": false,
"count": 5,
"result": [
{
"_id": "11172897562/11178271514",
"loc": [
0,
-10
],
"_rev": 11178271514
},
{
"_id": "11172897562/11177616154",
"loc": [
-10,
0
],
"_rev": 11177616154
}
],
"code": 201,
"error": false
}

View File

@ -0,0 +1,32 @@
> curl --data @- -X PUT --dump - http://localhost:8529/_api/simple/near
{ "collection" : "11182465818", "latitude" : 0, "longitude" : 0, "limit" : 2, "distance" : "distance" }
HTTP/1.1 201 Created
content-type: application/json
{
"hasMore": false,
"count": 5,
"result": [
{
"distance": 0,
"_id": "11182465818/11187905306",
"loc": [
0,
0
],
"_rev": 11187905306
},
{
"distance": 1111949.26644559,
"_id": "11182465818/11187839770",
"loc": [
0,
-10
],
"_rev": 11187839770
}
],
"code": 201,
"error": false
}