【发布时间】:2018-02-10 02:16:59
【问题描述】:
例如假设我们有这个映射:
{
"location":{
"dynamic":"false",
"properties":{
"locality":{"type":"text"},
"country":{"type":"text"},
"postalCode":{"type":"text"},
"coordinates":{"type":"geo_point"},
"radius":{"type":"double"}
}
}
}
这是我的查询:
GET index_name/location/_search
{
"query": {
"bool": {
"filter": {
"geo_distance": {
"coordinates": [
2.352222,
48.999
],
"distance": $radius <--- *(here I want to access the
value of radius in document)*
}
}
}
}
}
是否有办法在 Elasticsearch 查询中访问字段文档值?
使用 脚本查询 可行吗?文档here
【问题讨论】:
-
您链接的文档就是这样做的,所以我不明白为什么它不可行..
标签: elasticsearch elasticsearch-5