나는 내가 지금이 간단한 예제 제대로 https://mikewilliamson.wordpress.com/2014/05/07/arangodbs-geo-spatial-functions/ArangoDB 지리 공간 배열
를 실행 한 공간 쿼리
에 대한 ArangoDB을 연구하고있어, 일반적으로 ArangoDB 및 NoSQL에 새로운 해요, 현재 문서에 적용하려고하면 작동하지 않는 것 같습니다.
다음은 내 JSON 문서
의 예입니다.{
"branches": [
{
"currentGeoLocation": {
"latitude": -10,
"longitude": 1
}
}
],
"name": "example"
}
나는 운이
LET coll = (FOR item IN positions
RETURN {
name:item.name,
lat:item.branches[0].currentGeoLocation.latitude,
lng:item.branches[0].currentGeoLocation.longitude
})
FOR geo IN WITHIN(coll, -10, 1, 1) RETURN geo
-----------
FOR item in positions
FOR branch in item.branches
for geo in within(branch,-10,2,1)
return geo
사람이 제대로하십시오 실행 지리 쿼리를 얻기 위해 geoLocations의 수집을하는 방법에 대한 좀 도와 줄래으로 다음과 같은 쿼리를 시도
?
또한 오류없이 mongosh를 사용하여 지리 색인을 이미 정의했습니다. db.positions.ensureGeoIndex ('latitude', 'longitude');