使用 Azure 搜索进行地理位置搜索排序

问题描述

目前我正在使用 geo.distance 函数搜索结果进行排序,该函数有助于找到最近的位置。下面是我使用的 OrderBy 查询

- name: Configure proxy in maven
xml:
  path: /etc/maven/settings.xml
  namespaces:
    mvn: http://maven.apache.org/SETTINGS/1.0.0
  xpath: /mvn:settings/mvn:proxies
  pretty_print: yes
  set_children:
    - proxy:
        _:
          - id: "proxy"
          - active: "true"
          - protocol: "http"
          - host: '{{ proxied_proxy_node }}'
          - port: '{{ proxied_proxy_port | string }}'
when: maven_settings_file.stat.exists

目前一个文档与一个位置相关联。

现在有一个新要求,即文档与多个位置相关联,例如(将有 location1、location2....),我们需要按最接近的位置进行排序。

谁能就如何实现这一目标提出一些想法?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)