2016-12-05 71 views
0

我用指南針蒙戈..我想運行在以下蒙戈地理空間查詢指南針如何在Mongo羅盤UI中運行地理空間查詢?

db.restaurants.find({ location : { $geoWithin : 
          { $centerSphere : 
           [ [ 88 , 30 ] , 10/3963.2 ] 
        } } }) 

以上查詢是實際查詢。而且我有2個集合中,這些餐館和居民區..

看到下面的圖片 enter image description here

+0

我無法運行任何正常查詢。拇指朝下指南針。 –

回答

0

嘗試只進入查詢對象到輸入域,而無需db.restaurants.find...像這樣:

{ location : { $geoWithin : 
          { $centerSphere : 
           [ [ 88 , 30 ] , 10/3963.2 ] 
        } } } 
+0

沒有沒有工作顯示錯誤@ Rudi –

+0

看起來羅盤不能做'10/3963.2'的計算。它應該工作,如果你這樣嘗試:'{location:{$ geoWithin:{$ centerSphere:[[88,30],0.0002523213565]}}}' – Rudi

+0

不能正常工作.. apply buttond does not enable .. query box仍然專注於mongo指南針的紅色邊框@Rudi –