A couple of months back we were designing a new customer portal for one of our customers. Search was integral to the design and is one of the main methods for users to find relevant content. With a requirement of strong search functionality, we started exploring different options available in Salesforce. The out of the box search available in Salesforce was fairly limited as compared to the actual requirement. We tried SOSL, SOQL– the default options in SFDC, which were good up to an extent but had following limitations:
- Elements such as “Pick Lists” that are defined as not searchable are not available to SOSL
- Field types like number, date, or checkbox fields are not available to SOSL. The function, Query() can be used to search them but it is cumbersome to keep merging results.
- Text area fields are also unavailable unless we use the ALL FIELDS search group.
- Attachment records associated with certain objects, such as Account, Contact, or Opportunity are not searchable.
- The search() call provides synonym matching, stop words, stemming, and spell correction for articles. In most of the cases, the search() call does not provide specialized search features such as synonym matching or stop words.
The client requirements included:
This is where SOLR came to the rescue.
As per Apache, SolrTM is a popular, blazingly fast open source enterprise search platform from the Apache LuceneTM project. Its major features include powerful full-text search, highlighted search, faceted search, near real-time indexing, dynamic clustering, database integration, rich document (e.g. Word, PDF) handling, and geospatial search.
Here is the top-level architecture which we used for this integration – and is fairly easy to implement.
Using SOLR was easy since it provides a very simple REST based API. This was an easy way of communicating with SOLR for all our needs.
Apart from some real good features SOLR provides, here are bunch of improvements that we immediately noticed after implementing SOLR:
- The user experience improved significantly
- The search results are fast.
- With “facet” search, users can get better results through filtered search process.
- Since it is easier to find content,
- Case Deflection metrics improve and customers report fewer issues.
- Amount of duplicate and redundant content has reduced.
- There is no fear of hitting governor limits of Salesforce while doing the customized search with SOSL or SOQL.
While all the above were great – there is a secondary benefit – of improving the content.
To know more, drop us a line at email@example.com.