Share with your friends










Submit
Rocket Lawyer news

The Evolution of Search at Rocket Lawyer

How do you find a legal document, lawyer, article, or service at Rocket Lawyer? The answer is simple: Just type in what you are looking for in the search box, and a site search will return all your relevant search results. That’s easy enough, right? While our customer experience is simple, there is a lot more that happens behind the scenes!

SOLR

For over two years, we had been using Solr and SolrCloud for our entire full-text search needs. This technology provides a simple abstraction from the underlying Lucene libraries. Furthermore, SolrCloud has an excellent development community, which makes it easy to pick it up and implement.

However, prior to SolrCloud, Solr index replication was cumbersome. It was master-slave based, manually configured where failure recovery often meant rebuilding the entire index. With the release of SolrCloud, replication became more reliable and efficient since it uses Apache Zookeeper. However, to be fully redundant, the recommended minimal size of a Zookeeper ensemble is 3 servers. For smaller development teams, deploying and maintaining a SolrCloud cluster and a Zookeeper ensemble can be a big burden.

ElasticSearch

When we had the opportunity to revisit our search features and framework, we decided to evaluate different full-text search solutions. Over the past couple years, ElasticSearch has become an increasingly more popular choice over Solr. Although not as mature as Solr, ElasticSearch has built a loyal community and is enjoying a surge in popularity.

In many ways, ElasticSearch is very similar to Solr. Like Solr, ElasticSearch runs as a standalone Java process and offers a simple HTTP interface to underlying Lucene libraries. They both have native clients for the most popular languages such as Java, Python, Ruby, and .NET.

One big difference between the two is that ElasticSearch provides its own built-in Zen discovery module. Like Zookeeper, Zen manages master election and new node discovery. Unlike Zookeeper, Zen runs within ElasticSearch and eliminates the need for additional servers. Therefore ElasticSearch is much easier to maintain and deploy compared to Solr.

Angular

Now that our search backend was updated with ElasticSearch, we decided that we should also update our search UI. The search UI used to be a plain input text box, where the user would just enter what he or she wanted to look for, and hit enter. Today, our search UI is much smarter, providing the user with a predictive, type-ahead search box. Using Angular, we implemented this box with an event listener, which would call the search service every time the user enters another character into the search box. The service would then return an array of predictive search terms from which the user could pick the best search term. This technology helps our user to quickly find the information they need.

Rocket Lawyer has just started using ElasticSearch and the Angular powered search box, and our users are already big fans of it. This technology is simple, lightweight and makes our user’s life easier. So, if you’re planning on building something needing full-text search, take a look at ElasticSearch and give it go.

At Rocket Lawyer, we always strive to use technology to delight our users. Innovation is key to driving our product forward and helping our users.

RELATED POSTS

Comments are closed.