If we want to transfer the data persisted in your Couchbase to ElasticSearch and use the power of inverted indexing of Elastic Search along with Couchbase. Then we can do this in easy steps.

Couchbase provides us a plugin for the Elastic search that makes your ElasticSearch node appear like a Couchbase Server node. After installation you can use the Cross-Datacenter Replication (XDCR) feature of Couchbase Server to transfer data continuously.

Installing Couchbase-Transport plugin:

Steps for installing the Couchbase transport plugin are:

Go to your installation directory for Elasticsearch:

cd elasticsearch-<version>

Install the Couchbase Plug-in. Replace the version number with the appropriate one. You can check your own required version here.

Updating configurations:

For making index into the elastic search you have to set a default template for your index.
This default template json can be found here. You can edit it as per your need and change the mapping of your index accordingly as per the need.

Yes, updating documents in ElasticSearch is a lot simpler in CouchBase than in ElasticSearch. Additionally, it’s easy to do something bad in ElasticSearch. Having a firewall between ES and CB gives another layer of security.