0
是有使用一個查詢那樣來執行搜索在ElasticSearch一個選項:與IDElasticsearch - 與geo_shape SEACH文檔基於其它文件geo_shape
- 獲取文檔= 1
- 本文檔具有場與geo_shape映射從該字段
- 獲取值
- 搜索其geo_shape字段其他文件與文檔相交(ID = 1)geo_shape
- 返回發現文檔
?
是有使用一個查詢那樣來執行搜索在ElasticSearch一個選項:與IDElasticsearch - 與geo_shape SEACH文檔基於其它文件geo_shape
?
是的,您可以使用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
這是偉大的!非常感謝你! – Daniel