我正在尝试将数据从mongodb移至elasticsearch。
curl -XPUT "localhost:9200/myindex/river/_meta" -d '{
"type": "mongodb",
"mongodb": {
"servers": [
{
"host": "127.0.0.1",
"port": 27017
}
],
"options": {
"secondary_read_preference": true
},
"db": "handmade",
"collection": "logData"
},
"index": {
"name": "myindex",
"type": "classdata"
}}' -H 'Content-Type: application/json'
但是,代码内容按原样插入。
type:mongodb mongodb.servers:{ "host": "127.0.0.1", "port": 27017 } mongodb.options.secondary_read_preference:true mongodb.db:handmade mongodb.collection:logData index.name:myindex index.type:classdata _id:_meta _type:river _index:myindex _score:0
出什么问题了?