Making Site Search Worth Using with Solr

The default Drupal search doesn’t get the job done for most decent sized Drupal sites, much less enterprise site, but after enabling Acquia’s Solr Search for our client Lambda Legal, we totally transformed the role search plays on the site.

There are several problems with standard Drupal search that always drive me crazy including the lack of stemming, spelling suggestion, context aware results, and most important biasing. Search context matters. If I’m looking for an event, event dates and times matter to me when evaluating search results… not to mention whether or not the result itself is actually an event or just a page with the same words. If I’m looking for information on an issue, dates and times matter less.

I put this into practice yesterday — greatly improving Lambda Legal’s site search. What’s better is that it was relatively straight forward to implement.

Since Lambda Legal is hosted on Acquia, I was able to get the desired search results by using the Acquia Search, Apache Solr Search, Apache Solr Framework, and Apache and Solr Search Integration modules.  A note to developers: If you are enabling Acquia Search on an existing site, you will need to deploy the modules to production, turn them on, run cron to connect to Acquia’s Solr server, and then index the site before you can continue tweaking and experimenting in your local environment.

We also wanted our event nodes to appear with the event’s date field (not the node’s date created field) featured and have plans to add photos and other rich data to the results like Google. We added the Rich Snippets and Rich Snippets and Schema.org modules (and enabled Drupal core’s RDF module) to get to that goal and lay the groundwork for more improvements. One caveat, Apache Solr Search version 1.4 is needed due to a compatibility problem with Rich Snippets.

Why didn’t I use the Views module?  Because the Apache Solr Views module was found to be limiting and confusing while the Rich Snippets module offered a solution to our display problem and closer to a wider standard of search results presentation.

Take it for a spin!

Lamba Legal does a lot of work promoting pride events nation wide. So it’s only natural to expect those events to trickle to the top of the result set when “pride” is the search term.

http://www.lambdalegal.org/search/site/pride

Showing off Acquia Search’s stemming capabilities, searching for “bully” matches on “bullying” and “bullied.”

http://www.lambdalegal.org/search/site/bully