blog-banner

Beware of Core Search Module

    Drupal 7 Search Module

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

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

    One important thing that often turns regretful along this process; is the failure to disable the 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.

    [[{"type":"media","view_mode":"media_large","fid":"106","attributes":{"alt":"","class":"media-image","typeof":"foaf:Image"}}]]

    If you are sailing in the same boat remember to disable the node from the 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 the search index from the Drupal admin interface. Check out issue #326062, if you are interested in supporting this feature.

    One of our client's sites 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 lightning faster, eventually reducing the failing cron runs and some bandwidth costs as well.