Using the Search API module
As an alternative to using the Apache Solr Search Integration module, Acquia Search supports using the Search API module. In most cases, we recommend that you use the Apache Solr Search Integration and related modules instead. Based on our extensive experience helping Acquia Search customers with both the Apache Solr Search Integration module and the Search API module, we have found that using the Apache Solr Search Integration module results in a search solution that is more scalable, better performing, better integrated with Apache Solr, and easier to configure and maintain.
Best practices for using Search API
The biggest thing to consider is that, if you choose Search API, you have to know how to configure it. Because Search API has such extensive configuration options, it is a lot easier to make mistakes. So when you are thinking about scaling a website you need to make conscious choices.
- Never do any text processing in Drupal. For example, the Search API processors, such as stopwords, synonyms etc., can be easily configured in Solr itself.
- Make sure that you understand the memory footprint of the search page and that it is consistent with your server resources and configuration. Consider that search is a random result based on user input. When you use views and view modes to render your search results, you should either use the Solr fields to theme, or make sure that your cache is big enough and your server is fast enough to render quickly the entities returned on the search page. Entity caching makes a huge difference.
Multi Site Searching in Search API (not multi index searching, which is called
search_api_multi) is difficult to achieve OOTB due to the architecture of Search API. It was not the main intention to show content that doesn't rely on entities within the current site. Multi site can mean Drupal Multi Site or a combination of Drupal 6 and Drupal 7 sites with a completely different codebase.
Setting up the Search API module with Acquia Search
Acquia Search happily supports both modules in an equal manner, so the ultimate choice is yours. If, despite these factors, you want to use the Search API module with Acquia Search, follow the instructions in this topic.
Note: Do not attempt to use both the Search API module and the Apache Solr Search Integration module in the same environment.
To use the Search API with Acquia Search:
- Install and enable the following Drupal modules:
- Connect your site to your Acquia subscription. For more information, see Acquia Connector.
- Run cron manually to have Acquia confirm your search subscription status and allow you to enable the Acquia Search module.
Drupal 7: In the admin menu, select Reports, click the Status report link, and then click the run cron manually link in the Cron maintenance tasks section.
Drupal 6: In the admin menu, select Administer > Reports > Status report, and then click the run cron manually link in the Cron maintenance tasks section.
After cron has finished, Acquia provisions Acquia Search for your site. The provisioning process can take a few minutes to complete.
- In the Acquia Search page of the Acquia UI, click the gear icon to open the Acquia Search settings box.
- Under ApacheSolr module version, select the version that corresponds to the version of the Search API Solr module that you are using, and click Save.
- In your site's Drupal module administration, configure the Search API Solr search module. When you add a server for the Search API, set the Service class to Acquia Search, not to Solr service. You will need to also add or configure an existing index to use the new search server you added.
Unlike the Apache Solr Search module, the Search API module does not add a new option for the existing core search block and form. To search and display results, you will need to enable and configure either the Views module or the Search API pages module.
If you use the Search API attachments module for indexing and searching file attachments, you need to configure it to work with Acquia Search. After installing and enabling the Search API attachments module and all its requirements, go to the Search API configuration page, and open the Search API attachments tab. Under Solr Extraction Settings, set the Solr extracting servlet path field to