【问题标题】:Setting an ElasticSearch geo_point Mapper Type via Elastical (node.js)通过 Elastical (node.js) 设置 ElasticSearch geo_point Mapper 类型
【发布时间】:2013-01-19 22:42:42
【问题描述】:

我一直在挖掘Elastical 源代码,试图弄清楚在创建索引时如何设置核心类型。具体来说,我需要将一个字段设置为 geo_point 字段。

Mongoosastic 中,我只是在我的架构上设置了 es_type 字段,但我不知道如何在 Elastical 中进行等效操作。

谢谢!

【问题讨论】:

    标签: node.js elasticsearch


    【解决方案1】:

    看起来我在寻找“putMapping”函数。

    elastical.putMapping(index, type, {'type': {'properties': {"coords" : {"type" : "geo_point", "store": "yes"}}}}, function(e,r){});
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-06-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-07
      • 2015-08-31
      • 2020-03-02
      • 1970-01-01
      相关资源
      最近更新 更多