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:

  1. To create a river (my_river), the HTTP method used is PUT (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.

Get ElasticSearch Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.