Installing the plug-in

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 Couchbase Plug-in 2.0 is compatible with Elasticsearch 1.3 and Couchbase Server 3.0 and earlier.

  1. Go to your installation directory for Elasticsearch:

    cd elasticsearch-<version>

  2. Install the Couchbase Plug-in. Replace the version number with the appropriate one.
    bin/plugin --install transport-couchbase --url \
    http://packages.couchbase.com.s3.amazonaws.com/releases/\
    elastic-search-adapter/2.0.0/elasticsearch-transport-couchbase-2.0.0.zip
  3. After a successful installation, the plug-in installer returns:
    DONE Installed transport-couchbase 
  4. Set the username and password for the plug-in:

    echo "couchbase.password: password" >> config/elasticsearch.yml ; echo "couchbase.username: Administrator" >> config/elasticsearch.yml

  5. 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

  6. After you are done installing the two plug-ins, you can start Elasticsearch:

    bin/elasticsearch

    Elasticsearch will start and run on your machine in the background.

  7. You can open the administrative client for Elasticsearch by going to this URL in a browser http://localhost:9200/_plugin/head/. 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.