When having your drupal site it is good to know your search options. There is the standard drupal search, but that could slow down the site when reaching a decent amount of nodes. Ask the drupal.org maintainers! An option at that point is SOLR.
You are going to use a dedicated search machine that will index your content without having an impact on your drupal site. That's great! But how can you use SOLR? Read on.
An easy way to use apache SOLR on your drupal website is Acquia search. You get a 30-day free trial subscription or buy one that is convenient for your site. After that you download and install the acquia modules, install them and enter your subscription key. Now you can start the indexing!
Your own SOLR
If - for any reason - you need your own SOLR, you can install it yourself. I found a nice tutorial here.
Having your own SOLR, you can create as much cores (indexes) as necessary to index all your sites. You can configure everything yourself. And you are not limited to a number of slices (as with Acquia Search).
The downside (compared to Acquia Search) is that you'll have to install, configure and maintain your own server.
Migrating from Acquia Search to SOLR
Now I'm getting to the point of my blogpost. When you need to change your SOLR settings of your site from Acquia Search to your own SOLR, you could get some strange, time consuming problems.
You first disable the acquia modules, you uninstall them. After that you change the apache_solr settings to contact your own server. But then, when clicking the index tab, you will get this error:
Fatal error: Call to undefined function acquia_search_auth_cookie() in /sites/yoursite.com/modules/acquia_search/Acquia_Search_Service.php on line 28
Didn't we just disable and even uninstall the Acquia modules? Doesn't the uninstall remove all acquia settings? Then why do we get this error?
Well, this is the answer:
In your "variable" table in the database a variable hasn't been removed. It's the "apachesolr_service_class" variable. Delete the variable. Also make sure you don't have any features with strongarm that will re-import the variable when reverting the feature !
"But you made it through the troubled times" - Fountains of Wayne / Troubled Times
- nicolas's blog
- Log in to post comments