gpt4 book ai didi

amazon-web-services - DynamoDB到ElasticSearch Geohash

转载 作者:行者123 更新时间:2023-12-02 23:58:28 27 4
gpt4 key购买 nike

我跟随this article用亚马逊DynmoDB索引我的ElasticSearch内容。我在每个DynamoDB行中都有一个嵌套字段,称为location,其中包含5个项目:latitudelongitudehorizontal accuracyvertical accuracyaltitude

当我通过this lambda function code(在上一个链接中引用)通过DynmoDBElasticSearch内容编制索引时,每个项目都被标记为正确的float类型。但是,我想将location标记为geo-point,并利用ElasticSearchgeohash功能,以便执行地理空间查询。

我应该怎么做才能将location转换为geo-point并使用geohash索引每一行?我是ElasticSearch的新手,所以我确定自己搞砸了一些术语。

最佳答案

您的ElasticSearch索引映射是什么样的?您应该设计索引映射,以便ElasticSearch知道locationgeo-point。您确实不需要“转换”任何内容-ElasticSearch应该根据索引定义将您的请求转换为适当的字段类型

参见https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.htmlhttps://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html

关于amazon-web-services - DynamoDB到ElasticSearch Geohash,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51270329/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com