Managing a river
In ElasticSearch, the following are the two main action-related river setups:
- Creating a river
- Deleting a river
Getting ready
You need a working ElasticSearch cluster.
How to do it...
For managing a river, we need to perform the following steps:
- A river is uniquely defined by a name and a type. The type of the river is the type name defined in the loaded river plugins.
- After the
name
and thetype
parameters, usually a river requires an extra configuration that can be passed in the_meta
property. - To create a river, the HTTP method is
PUT
(POST also works):curl -XPUT 'http://127.0.0.1:9200/_river/my_river/_meta' -d '{ "type" : "dummy" }'
The
dummy
type is a "fake" river always installed in ElasticSearch. - The result will be as follows:
{"ok":true,"_index":"_river","_type":"my_river","_id":"_meta","_version":1}
- If you look at ElasticSearch logs, you&apos...