CouchDB-Lucene installation guideline for Full-Text search
Build couchdb-lucene application
- 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.)
- Enter into the application root directory by the command : cd couchdb-lucene
- Run the command: mvn install
- Run the command: mvn
- Enter into the target folder you will find a tar and a zip folder.
- Unzip or Untar the folder and put it to a suitable location i.e /opt
- 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
Enter into directory by the command cd /opt/couchdb-lucene/tools/etc/init.d/couchdb-lucene/
Edit the couchdb-lucene file as DAEMON=/opt/couchdb-lucene/bin/run for your application directory path.
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/
After saving run the command in the terminal cp couchdb-lucene /etc/init.d/
Restart couchdb service to fall your change effect executing the command sudo service couchdb restart
Start the couchdb-lucene service executing the command sudo service couchdb-lucene start to create the Channel with couchdb server
This site is no longer maintained. Please visit docs.opensrp.io for current documentation.