Making Apache Solr
Monday, June 29, 2009
the only search engine available
This how-to handbook is for absolute beginners.
We are now going to disable the default Drupal search engine. Then make Apache Solr the only search engine available. This is a big performance improvement for large Drupal site.
There are currently two modules able to do this. CORE SEARCHES & SUPRESS SEARCH. CORE SEARCH module modify Drupal core whereas SUPPRESS SEARCH does not. Modifying Drupal core is consider really bad by the Drupal community. You should not modify Drupal core. But override it instead. For this reason this handbook will use the SUPRESS SEARCH module.
Download and install SUPRESS SEARCH module.
Navigate to ADMINISTER > SITE CONFIGURATION > SUPPRESS SEARCH SETTINGS
Under section SEARCH FORM SUBMIT PATH type in
search/apachesolr_search/
Check HIDE CONTENT TAB box.
Check HIDE USERS TAB box.
Click on SAVE CONFIGURATION button.
Click on EMPTY CORE SEARCH INDEX button.
Drupal will ask
Are you sure you want to empty core's search index?
Click on EMPTY CORE SEARCH INDEX button again.
If successful the last two lines of the EMPTY SEARCH INDEX section should now read.
search_index: 0
search_dataset: 0
Navigate to ADMINISTER > SITE CONFIGURATION > PERFORMANCE
At the bottom of the page click on CLEAR CACHE DATA button.
Navigate to ADMINISTER > SITE CONFIGURATION > SEARCH SETTINGS
Under section INDEXING THROTTLE set the NUMBER OF ITEMS TO INDEX PER CRON RUN to 0 (zero).
Click on SAVE button.
To test go to http://yourdomainnamehere.com/search/apachesolr_search/
Under ENTER YOUR KEYWORDS.
Type in a keyword.
Click on SEARCH button.
If your Solr search returns no result go to http://yourdomainnamehere.com?q=admin/settings/apachesolr/index
Make sure that the first line reads
The search index is generated by running cron. 100% of the site content has been sent to the server. There are 0 items left to send.
If not 100% click on 'running cron' link until 100% of the site content has been sent to the Solr server.
Tips: Clicking the 'running cron' link does the same thing as going to http://yourdomainnamehere.com/cron.php
You have successfully disabled the default Drupal search engine. Then made Apache Solr the only search engine available.
0 comments: to “ Making Apache Solr ”
Post a Comment