Beware of core search module

sivaji's picture

A quick tip for sites using Drupal 7 core search module. It is very common to see Drupal sites counting on core search module to feature native site search functionality. When the volume of the content grows, need for offloading the search to thirdparty server could felt; as core search doesn't scale or designed to yield optimal output.

By means of contrib module, Drupal provides platform to integrate with proven solutions like sphinxLuceneApache Solr, Google Custom Search Engine, etc. 

One important thing that often turns regretful along this process; failure to disable node search module. Remember the core module has been designed in such a way that it can accommodate more than one search module to play at once. Until the node module is disabled from search settings (admin/config/search/settings) , it remains functional and keeps hurting your site performance during every cron. 

If you are sailing in the same boat remember to disable node from active search module. Also be dare to truncate the {search_index} table because you don't need it, if you are not using the node search module.

Also as of Drupal 7.14 there is no way to clear search index from Drupal admin interface. Checkout issue #326062, if you are interested in supporting this feature. 

One of our client's site we maintain had 1605495 rows in {search_index} table. Needless to say most of the database backup process time was spent on this. Truncating this table together with other search related tables made our site backup lightening faster, eventually reduced the failing cron runs and some bandwidth cost as well.