Creating a river
imadulhaque opened this issue · comments
Hi,
I am trying to create river. That's what I have done. But it complaints that name is required.
var options = {_index : 'roles_index', _type : 'roles'};
var meta = {name: "couchdb", "couchdb" : { "host" : "localhost", "port" : 5984, "db" : "roles", "filter" : null }};
riverClient.cluster.putRiver(options, meta, function(err, data){
console.log(err);
callback(null);
});
I would really appreciate your help.
Thanks.
Hi @imadulhaque
It looks like the name
parameter needs to be included in the options
element:
var options = {
_index : 'roles_index',
_type : 'roles',
name : 'couchdb'
};
Does this work for you?
Thanks for the quick reply brozeph. That fixed it. but seems like things are not correct as I don't see any data in the index. if I do this:
GET _river/roles_index/_search?pretty=true
Here is what I see:
{
"took": 1,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 1,
"max_score": 1,
"hits": [
{
"_index": "_river",
"_type": "roles_index",
"_id": "_meta",
"_score": 1,
"_source": {
"_type": "couchdb",
"couchdb": {
"host": "localhost",
"port": 5984,
"db": "roles",
"filter": null
}
}
}
]
}
}
Not sure which version of Elasticsearch that you're using but rivers were deprecated in v1.5 I think... could this possibly be related?
I am using v1.6. Rivers are deprecated but still supported. I can use curl commands to create river and search data from the index.
Closing due to time from initial report and changes in Elasticsearch