Introduction
While setting up a new instance of SugarCRM 7.1 I reached a point in which Elasticsearch is required to continue. This is a very welcomed surprise! For those of you not familiar with full text search in SugarCRM, it offers the following benefits.
- Full text search on keywords or partial words
- Quick View previews search results with the search string highlighted
- Prioritized results are shown first for the module from which the search is performed, followed by results from other modules
- Wildcard searches
- Include a field name in searches to filter results by matches to that field only
- Show All link displays the full search results from each module in separate panels
Installation
While Googling I noticed a common theme of making installation way more difficult than it needed to be. Many tutorials have you install Elasticsearch, install a service wrapper, move files and directories here and there, etc. Overkill.
Installing it is pretty simple using the provided RPM from the Elasticsearch website.
If you are installing for SugarCRM (which is a majority of the traffic generated to this post), I recommend adding the following to the configuration file located at /etc/elasticsearch/elasticsearch.yml
Testing
Testing to make sure it works is pretty straight forward. Using curl we will make sure the service is running on the standard port of 9200.
The results returned should resemble something along the following lines.
Full Text Search Examples
See the following links for more information on how to use Elasticsearch as a whole and some more specific SugarCRM examples.
http://joelabrahamsson.com/elasticsearch-101/
http://developer.sugarcrm.com/2012/07/06/full-text-search-tricks/
THANK YOU! Very helpful.
Thanks You!! Worked like a charm.
I definetely would not recommend to install Elasticsearch as V. 0.90 anymore, since there the scripting engine is enabled by default.
This is a massive security risk. Go and get at least a 1.x version or the newest which is 1.3 (Date: August 2014)
While I agree, SugarCRM does not support 1.x. I will update this post to advise more accurately when to use which version as I get a lot of traffic for both generic ElasticSearch installs and SugarCRM related ElasticSearch installs.
Thanks for the heads up!
I used this to install 1.3.1 (which is recommended for Sugar 7.5). I just swapped out 0.90.10 for 1.3.1.
Also, I installed ES on ubuntu using wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.1.deb, then installed using dpkg -i elasticsearch-1.3.1.deb.