Integrating Apache Solr with Drupal Autocomplete

2013-06-07

Sergey Cheban

Integrating Apache Solr with Drupal Autocomplete

How to set up Apache Solr search integration with Drupal for advanced autocomplete functionality.

Although Drupal has a good built-in search functionality that comes out of the box, sometimes a client wants something more advanced and feature rich that scales well for a quickly growing website. This is where Apache Solr comes into play. Apache Solr is an open source project that is used on many high traffic websites like Zappos.com and is well integrated into Drupal.

Files and modules needed:

  1. Apache Solr Search Integration - Download and Enable
  2. Apache Solr Autocomplete - Download and Enable
  3. Apache Solr 3.6.2 - Download to your server

Setup:

  1. Extract Apache Solr to a directory like /home/Servers
  2. Copy configuration files from sites/all/modules/apachesolr/solr-conf/solr-3.x/ to /home/Servers/apache-solr-3.x/example/solr/conf
  3. Start Apache Solr: java -jar start.jar (you need Java installed: sudo apt-get install default-jdk)
  4. Go to admin/settings/apachesolr, click on ‘Advanced Configuration’ and make Apache Solr as the default search

To check if everything is running properly, go to: http://localhost:8983/solr/admin