Using Solr with Drupal: 1 Getting Started with Solr
Welcome to Sage Tree's Solr Search Series
This is the first in a series of blog posts that provide a guide to integrating Drupal and Solr search. In our series we will provide a quick introduction to using Solr, an in-depth enterprise level deployment strategy, an evaluation of Drupal integration methods and a series of posts on search interface and results presentation.
Why Solr Search?
Solr is an open source project from the Apache Software Foundation that provides fast and efficient site search capabilities. Solr acts as a dedicated search server that operates independently from your site database. The key to Solr's efficiency is the index, a pre-built data catalog, which then can be efficiently referenced against your search terms and filters to quickly return your results. Via its REST-like API you put documents in it (called "indexing") via XML, JSON, CSV or binary over HTTP and you query it via HTTP GET and receive XML, JSON, CSV or binary results.
Understanding the Solr "Stack": Jetty, Tomcat, Solr & Core
One of the keys to effectively using Solr is understanding what we call the Solr stack. Technically, Solr is a Java servlet running on a Java servlet container. What does that mean? At the base level is an underlying Linux (or other) server, on top of that runs a Java container and on top of that runs Solr. There are many Java containers available, but the two most popular are Jetty and Tomcat.
Drupal Solr Integration Methods
Currently there are two main methods for integrating Solr with Drupal that we call the apache-solr and search-api methods. We will give a quick outline of the two options here and in a later post we'll examine and compare them in more detail. The key to the apache-solr method is the Apache Solr Search Integration module, which - as its name implies - provides a direct link between Drupal and Solr. This is probably the most popular integration method and is the one used by Drupal.org.
Solr Quick Start
If you haven't used Solr before, a very quick (and free!) way to explore the technology is to use Pantheon Drupal hosting and their built-in Solr integration. This strategy allows you to focus on using Solr and Drupal, without the need to deal with the full installation and configuration of the Solr search stack. Of the two integration methods, apache-solr is the easiest to use with Pantheon, as it has native support.
What's Next?
Now that you have a basic understanding of Solr and the Solr - Tomcat relationship, our next goal will be to install Tomcat and its web manager app on your Linux server. Then we will move on to Solr.