2016-11-24 1 views

答えて

2

あなたはこのようなgeo_shapeクエリを使用する必要があります。緯度の前に経度を設定してくださいcoordinatesパラメータで

{ 
    "query": { 
    "bool": { 
     "filter": { 
     "geo_shape": { 
      "location": { 
      "shape": { 
       "type": "point", 
       "coordinates": [ -77.03653, 38.897676 ] <-- lon/lat to search 
      }, 
      "relation": "contains"      <-- use the contains relationship 
      } 
     } 
     } 
    } 
    } 
} 

をし、周りにいない他の方法(トンハンクスGeoJSON)

+0

これを試すことができましたか? – Val

+0

ちょうどそれを試してみました。 '' relation ":" contains "を削除することができます。デフォルトは' intersects'です。ポイントクエリの場合、デフォルトが動作します。 – samol

+0

Gotcha、それは助けてうれしい! – Val

関連する問題