Thursday, 29 December 2011

How to integrate Apache Solr with Drupal 6 in windows or linux

I want to share my experience of integrating Apache Solr (Full text search and powerful than drupal core search) with Drupal 6.

Step 1: Download Apache Solr module from here, and
place it in your drupal contributed modules folder.

Step 2: Before enabling the module, we need to do some additional configurations.
Download the apachesolr php client library from here .
After extracting the files, place solrphpclient folder into apachesolr module folder.

Step 3: Now enable Apache Solr Framework and Apache Solr Search modules from admin/build/moules section.

Step4:  Now download Apache Solr from here. and extract the contents.

Step 5: Unpack the tar ball or zip file downloaded in step 3 outsite your drupal installation and outside web root.

Step 6:  Goto /apachesolr1.4.0/example/solr/conf and copy schema and solrconfig files to the same directory and rename them as schema.bak and solrconfig.bak

Step 7: Copy schema and solrconfig files from your drupal installation apachesolr module to above location and replace wih existing files.

Step 8: Now open your command prompt and browse to apachesolr1.4.0/example directory.

Step 9: Type belo command to start apachesolr service
               >> java -jar start.jar
Step 10: Test your solr server admin innterface by visiting http://localhost:8983/solr/admin/ . If you can able to see admin page then your solr is running and ready to use with drupal.

Step 11:  Its time to configure drupal search with apache solr. Please goto admin/settings/apachesolr/index and run cron to index the content using apache solr search engine.

Step 12: Now goto admin/settings/apachesolr click on advanced configuration and make apache solr as default search. Now go to admin/settings/apachesolr/enabled-filters and enable the sorting filtrers.

Step 13: Now goto blocks and enable the necessary apache solr related blocks.

Step 14: To enable facets please go to admin/settings/apachesolr/enabled-filters and enable filters. Now go to blocks and enable the facets filtering blocks where ever you want !!

No comments: