To enable full-text search of data in Couchbase, you transmit data from a Couchbase cluster to an Elasticsearch cluster where it will be indexed by Elasticsearch. The Couchbase Plug-in for Elasticsearch helps transmit data from Couchbase using a protocol understood by Elasticsearch. The plug-in ensures that information from Couchbase can be mapped and converted into data which Elasticsearch will index and query.
This plug-in is compatible with Couchbase Server 2.0 and Elasticsearch 0.20. For more information about the administrative tool for Elasticsearch, see Elasticsearch head.For more information about setting up Elasticsearch, see Elasticsearch Install
Go to your install directory for Elasticsearch:
Install the Couchbase Plug-in:
bin/plugin -install couchbaselabs/elasticsearch-transport-couchbase/1.0.0-dp
After a successful install, the plugin installer returns:
DONE Installed transport-couchbase
Set the username and password for the plug-in:
echo "couchbase.password: password" >> config/elasticsearch.yml echo "couchbase.username: Administrator" >> config/elasticsearch.yml
The other plug-in to install is a third party plug-in for Elasticsearch called head; this plug-in provides a simple web user interface you can use to interact with Elasticsearch:
bin/plugin -install mobz/elasticsearch-head
After you are done installing the two plug-ins, you can start Elasticsearch:
Elasticsearch will start and run on your machine in the background.
You can open the administrative client for Elasticsearch by
going to this URL in a browser
The following screen with a randomized name will appear:
At this point you have the Couchbase Plug-in for Elasticsearch and the Elasticsearch engine installed and running. You can now set up the index templates for Elasticsearch and set up Couchbase Server to send data to Elasticsearch.