Site Building

Create a Search API Index for Drupal 7

This page is archived

We're keeping this page up as a courtesy to folks who may need to refer to old instructions. We don't plan to update this page.

Sprout Video

In order for Solr to provide search results we need to first send our Drupal content to the Solr server so that it can be indexed. In this tutorial we'll look at connecting the Search API module with the Solr server and creating an index that maps content in Drupal to data types in Solr. We'll also look at how the various configuration options effect the Solr index.

After creating a Search API index configuration we'll look at running the indexer, essentially queuing all the content on our site for indexing, and then telling Drupal to send the documents on our site to the Solr server for indexing. This can be done either via the UI or with Drush. You can choose to index content as it's created, or for sites with higher rates of new content you can send it to the indexer in periodic batches. Whichever you choose, making sure that you've got a system in place for periodically sending items queued for indexing to Solr is a critical step.

By the end of this tutorial you should be able to send content from Drupal to Solr for indexing, and verify that the content is showing up in the Solr server's index.