Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When to definitely use SOLR over Lucene in a Sitecore 7 build?

Tags:

My client does not have the budget to setup and maintain a SOLR server to use in their production environment. If I understand the Sitecore 7 Content Search API correctly, it is not a big deal to configure things to use Lucene instead. For the most part the configuration will be similar and the code will be the same, and a SOLR server can be swapped in later.

The site build has

  • faceted search page
  • listing components on landing and on other pages that will leverage the Content Search API
  • buckets with custom facets

The site has around 5,000 pages and components not including media library items. Are there any concerns about simply using Lucene?

The main question is, when, during your architecture or design phase do you know that you should definitely choose SOLR over Lucene? What are the major signs that lead you recommend that?

like image 351
Patrick Jones Avatar asked Mar 21 '14 03:03

Patrick Jones


People also ask

What is SOLR used for in Sitecore?

Solr is a highly reliable search platform that powers the search and navigation features of many of the world's largest internet sites. It provides distributed indexing, replication with load-balanced querying, automated failover and recovery, centralized configuration and more.

Which is the commonly used search provider by Sitecore?

Solr is the default search engine for content search and xConnect search for on-premise installations.

How does SOLR index work with Sitecore?

Sitecore supports both Lucene and Solr search engines. The search engines are used for searching in the content databases, as well as for searching in a number of operational databases that Sitecore uses for collecting analytics data, test data, and so forth.


1 Answers

I think if you are dealing with a customer on a limited budget then Lucene will work perfectly well and perform excellently for the scale of things you are doing. All the things you mention are fully supported by the implementation in Lucene.

In a Sitecore scenario I would begin to consider Solr if:

  • You need to index a large number of items - id say 50 thousand upwards - Lucene is happy with these sorts of number but Solr has improved query caching and is designed for these large numbers of items.
  • The resilience of the search tier is of maximum business importance (ie the site is purely driven by search) - Solr provides a more robust replication/sharding and failover system with SolrCloud.
  • Re-purposing of the search tier in other application is important (non Sitecore) - Solr is a search application so can be accessed over HTTP with XML/JSON etc which makes integration with external systems easier.
  • You need some specific additional feature of Solr that Lucene doesn't have.

.. but as you say if you want swap out Lucene for Solr at a later phase, we have worked hard to make sure that the process as simple as possible. Worth noting a few points here:

  • While your LINQ queries will stay the same your configuration will be slightly different and will need attention to port across.
  • The understanding of how Solr works as an application and how the schema works is important to know but there are some great books and a wealth of knowledge out there.
  • Solr has slightly different (newer) analyzers and scoring mechanisms so your search results may be slightly different (sometimes customers can get alarmed by this :P)

.. but I think these are things you can build up to over time and assess with the customer. Im sure there are more points here and others can chime in if they think of them. Hope this helps :)

like image 85
Stephen Pope Avatar answered Oct 13 '22 20:10

Stephen Pope