删除现有索引
curl -XDELETE "http://hostname:9200/index/type"
删除现有的河流配置索引
curl -XDELETE "http://hostname:9200/_river"
创建映射到索引
curl -XPUT "http://hostname:9200/index/type/_mapping" -d'{"allnews": { "properties": { "category": { "type": "string" }, "description": { "type": "string" }, "link": { "type": "string" }, "state": { "type": "string", "index" : "not_analyzed" }, "title": { "type": "string" } }}}'完成这些步骤后,将river插件配置同步mongodb到elasticsearch。
希望能帮助到你..!



