Managing a river
In ElasticSearch, there are two main action-related river setups: creating a river and deleting a river.
Getting ready
You will need a working ElasticSearch cluster.
How to do it...
A river is uniquely defined by a name and type. The river type is the type name defined in the loaded river plugins. After the name
and type
parameters, a river usually requires an extra configuration that can be passed in the _meta
property.
In order to manage a river, perform the following steps:
To create a river (
my_river
), the HTTP method used isPUT
(POST
will work, too), as shown here:curl -XPUT 'http://127.0.0.1:9200/_river/my_river/_meta' -d '{ "type" : "dummy" }'
Tip
The
dummy
type is a fake river, which is always installed in ElasticSearch.This is how the result will look:
{"created":true,"_index":"_river","_type":"my_river","_id":"_meta","_version":1}
If you take a look at the ElasticSearch logs, you'll see some new lines, as shown here:
[2014-07-27 12:20:55,518][INFO ][cluster.metadata...