elasticsearch,Couchdb,elasticsearch" /> elasticsearch,Couchdb,elasticsearch" />

ElasticSearch CouchDB river-显式指定字段类型

ElasticSearch CouchDB river-显式指定字段类型,couchdb,elasticsearch,Couchdb,elasticsearch,我正在使用ElasticSearch river为CouchDB推文数据库编制索引。 “created_at”字段不符合“date”类型,并作为字符串索引。 我如何开始一条河流,明确指定“created_at”是一个日期,以便我可以对它进行范围查询 我尝试了以下river请求,但它不起作用,字段仍被索引为字符串: curl -XPUT 'localhost:9200/_river/my_db/_meta' -d '{ "type" : "couchdb", "couchdb" :

我正在使用ElasticSearch river为CouchDB推文数据库编制索引。 “created_at”字段不符合“date”类型,并作为字符串索引。 我如何开始一条河流,明确指定“created_at”是一个日期,以便我可以对它进行范围查询

我尝试了以下river请求,但它不起作用,字段仍被索引为字符串:

curl -XPUT 'localhost:9200/_river/my_db/_meta' -d '{
    "type" : "couchdb",
    "couchdb" : {
        "host" : "localhost",
        "port" : 5984,
        "db" : "testtweets",
        "filter" : null
    },
    "index" : {
        "index" : "my_testing",
        "type" : "my_datetesting",
        "properties" : {"created_at": {
                                    "type" : "date",
                                    "format" : "yyyy-MM-dd HH:mm:ss"
                                    }
                        },
        "bulk_size" : "100",
        "bulk_timeout" : "10ms"
    }
}'
我的数据如下所示:

{
   "_id": "262856000481136640",
   "_rev": "1-0ed7c0fe655974e236814184bef5ff16",
   "contributors": null,
   "truncated": false,
   "text": "RT @edoswald: Ocean City MD first to show that #Sandy is no joke. Pier badly damaged, sea nearly topping the seawall http://t.co/D0Wwok4 ...",
   "author_name": "Casey Strader",
   "author_created_at": "2011-04-21 20:00:32",
   "author_description": "",
   "author_location": "",
   "author_geo_enabled": false,
   "source": "Twitter for iPhone",
   "retweeted": false,
   "coordinates": null,
   "author_verified": false,
   "entities": {
       "user_mentions": [
           {
               "indices": [
                   3,
                   12
               ],
               "id_str": "10433822",
               "id": 10433822,
               "name": "Ed Oswald",
               "screen_name": "edoswald"
           }
       ],
       "hashtags": [
           {
               "indices": [
                   47,
                   53
               ],
               "text": "Sandy"
           }
       ],
       "urls": [
           {
               "indices": [
                   117,
                   136
               ],
               "url": "http://t.co/D0Wwok4",
               "expanded_url": "http://t.co/D0Wwok4",
               "display_url": "t.co/D0Wwok4"
           }
       ]
   },
   "in_reply_to_screen_name": null,
   "author_id_str": "285792303",
   "retweet_count": 98,
   "id_str": "262856000481136640",
   "favorited": false,
   "source_url": "http://twitter.com/download/iphone",
   "author_screen_name": "Casey_Rae22",
   "geo": null,
   "in_reply_to_user_id_str": null,
   "author_time_zone": "Eastern Time (US & Canada)",
   "created_at": "2012-10-29 09:58:48",
   "in_reply_to_status_id_str": null,
   "place": null
}

谢谢

我不确定,但在使用river之前,您是否尝试过在elasticsearch上创建索引和类型(带有映射)。你确定河流会为你发送地图吗,我在自述中看不到。。。