我的 elasticsearch 记录中有一个 addressList 部分,但我无法创建查询来获取值

问题描述 投票:0回答:0

下面是我记录里面地址栏的部分

 "addressList" : [
            {
              "city" : "Göteborg",
              "country" : "",
              "fullAddress" : "Lilla Bommen 5A, 411 04 Göteborg, Sverige",
              "location" : {
                "longitudeLatitude" : {
                  "lat" : 57.7123,
                  "lon" : 11.9677
                }
              },

这部分的映射如下

"addressList" : {
          "properties" : {
            "city" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "country" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "fullAddress" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "location" : {
              "properties" : {
                "longitudeLatitude" : {
                  "properties" : {
                    "lat" : {
                      "type" : "float"
                    },
                    "lon" : {
                      "type" : "float"
                    }
                  }
                }
              }
            },
            "prov" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            }
          }
        },

我想根据纬度经度和距离获取记录,此时我真的不想编辑我的映射,我苦苦挣扎了数周才能获得基于经纬度的查询来获取记录

elasticsearch kibana elastic-stack elk
© www.soinside.com 2019 - 2024. All rights reserved.