2017-04-06 51 views

回答

0

使用地理距離濾波器:

{ 
    "query": { 
     "filtered": { 
      "filter": { 
       "geo_distance": { 
        "distance": "1.6km", 
        "destination_location": "34.05,-118.24" 
       } 
      } 
     } 
    } 
} 

34.05是緯度和(-118.24)是經度。

1mile = 1.6km