2017-02-15 30 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