2017-02-15 92 views

回答

1

是的,您可以使用pre-indexed shapes來達到此目的。

POST /_search 
{ 
    "query": { 
     "bool": { 
      "must": { 
       "match_all": {} 
      }, 
       "filter": { 
        "geo_shape": { 
         "your_shape_field": { 
          "indexed_shape": { 
           "id": "1", 
           "type": "your_type", 
           "index": "your_index", 
           "path": "shape" 
          }, 
          "relation": "intersects" 
         } 
        } 
       } 
     } 
    } 
} 

這個查詢將返回其所有文件your_shape_field相交shape領域文檔ID爲1

+0

這是偉大的!非常感謝你! – Daniel