我使用的是mongodb 2.4.5和elasticsearch 0.90.5。当我在ObjectiveIndex上创建索引时,它显示“错误”:“IndexMissingException [[ObjectiveIndex] missing]”,“status”:404。
#!/bin/sh
curl -XPUT "localhost:9200/_river/ObjectiveIndex/_meta" -d'
{
"type": "mongodb",
"mongodb": {
"servers": [
{ "host": "localhost", "port": 27017 }
],
"options": { "secondary_read_preference": true },
"db": "mydatabase",
"collection": "pages"
},
"index": {
"name": "ObjectiveIndex",
"type": "Objective"
}
}'