CouchDB-Lucene installation guideline for Full-Text search

Build couchdb-lucene application

  1. Checkout the repository by git clone https://github.com/rnewson/couchdb-lucene.git ( Some breakage likely on master for a while. Use 1.1.0 release (https://github.com/rnewson/couchdb-lucene/releases/tag/v1.1.0) if you want stable.)
  2. Enter into the application root directory by the command : cd couchdb-lucene
  3. Run the command:  mvn install
  4. Run the command: mvn
  5. Enter into the target folder you will find a tar and a zip folder.
  6. Unzip or Untar the folder and put it to a suitable location i.e /opt
  7. Rename the folder couchdb-lucene-<version>-dist.* to couchdb-lucene

 

Configure CouchDB

   Configure the local.ini file located in the ubuntu machine  /etc/couchdb/ as the following settings.

   Add Python hook script

   [couchdb]
   os_process_timeout=60000 ; increase the timeout from 5 seconds.

   [external]
   fti=/usr/bin/python /opt/couchdb-lucene/tools/couchdb-external-hook.py

   [httpd_db_handlers]
   _fti = {couch_httpd_external, handle_external_req, <<"fti">>}


   Add proxy handler for CouchDB version 1.1 and above


   [httpd_global_handlers]
   _fti = {couch_httpd_proxy, handle_proxy_req, <<"http://127.0.0.1:5985">>}

 

CouchDB-Lucene run as Service

  1. Enter into directory by the command  cd /opt/couchdb-lucene/tools/etc/init.d/couchdb-lucene/

  2. Edit the couchdb-lucene file as DAEMON=/opt/couchdb-lucene/bin/run for your application directory path.

  3. If you have set your admin user in couchdb Navigate to /opt/couchdb-lucene/conf/ then Edit the couchdb-lucene.ini and edit the last code url = http://localhost:5984/ with url = http://youradminuser:youradminpass@localhost:5984/

  4. After saving run the command in the terminal cp couchdb-lucene /etc/init.d/

  5. Restart couchdb service to fall your change effect executing the command sudo service couchdb restart

  6. Start the couchdb-lucene service executing the command sudo service couchdb-lucene start to create the Channel with couchdb server