Magento Solr Bridge Installation Guide - 1.9



Or Vimeo url :


Table of contents

1. Tomcat6 (Web server)  installation.

2.  Apache Solr 4.9.0 installation.

3. Install SolrBirge package (preconfigured solr instance).

4. Make a new context for Solr in Tomcat6

5 Test Solr Bridge installation.

6. Extract and install magento extension

7. Magento Settings - General settings

8. Magento Settings - Solr indexes and Magento stores mapping

9. Assign solr index to Magento store (Important)

10. Search fields, Facets fields, boost fields settings

11. Run data indexing - send magento data to solr for indexing

12. Test the search

13. Customization


1. Tomcat6 (Web server)  installation.

Run the following command to install Apache Tomcat6 if your server does not exist Tomcat6 yet.
sudo apt-get install tomcat6
Note: Change Java heap settings. Open usr/shared/tomcat6/bin/ and around line 86 add the
following line:
CATALINA_OPTS="-Xms256m -Xmx1024m"

Test installation by opening web browser and run the url http://localhost:8080 or in terminal run the command curl http://localhost:8080

2. Apache Solr 4.9.x installation.

-Go to /usr/local directory by the command:
cd /usr/local
-Download Solr 4.10.3 by the command:

-Extract the solr-4.10.3.tgz  file by the command:
tar xvzf solr-4.10.3.tgz

       -Copy solr logs lib files to tomcat lib

/bin/cp -f /usr/local/solr-4.10.3/example/lib/ext/* /usr/share/tomcat6/lib/

3 Install SolrBridge package (preconfigured solr instance).

-Get inside the folder solr-4.10.3 by the following command:
cd /usr/local/solr-4.10.3
-Put the folder solrbridge4 (the sub folder included in the file Magento_Solr_Bridge_1.9.x) into /usr/local/solr-4.10.3
-Finally, you will have a directory solrbridge4 in /usr/local/solr-4.10.3

       -Get inside the directory solrbridge4 with cd /usr/local/solr-4.10.3/solrbridge4 and execute the shell script file named by following command:


4. Make a new context for Solr in Tomcat6

-Create a new file named solr.xml under /etc/tomcat6/Catalina/localhost by the following command:
vi /etc/tomcat6/Catalina/localhost/solr.xml
-And put the following xml code into the file solr.xml
<Context docBase="/usr/local/solr-4.10.3/dist/solr-4.10.3.war" debug="0" priviledged="true" allowLinking="true" crossContext="true">
<Environment name="solr/home" type="java.lang.String" value="/usr/local/solr-4.10.3/solrbridge4" override="true" />
-Restart tomcat 6 by the following command
service tomcat6 restart or /etc/init.d/tomcat6 restart

5. Test Solr Bridge installation.

Open browser and try to access the url in the following format:
http://<yourdomain or your ip address>:<port>/solr
Example: http://localhost:8080/solr

If you see the result as below, that you are done (The result must display a list of languages)


6. Extract and install magento extension

- Extract the file Magento_Solr_Bridge_1.9.x.tar.gz
- After you extract the file, you will a sub folder name magento which includes 4 directories app, js, lib,skin and sb.php
- Copy those 4 folders to your magento root(magento installed directory)
if your Magento is installed at: /var/www/magento, the /var/www/magento is the magento root


7. Magento Settings - SolrBridge > General settings

-Login to Magento admin panel and go to System > Configuration (SolrBridge > General settings)
-On the left side bar, you will see a section as below:



8. Magento Settings - Indices settings (Solr cores and Magento stores mapping).

-On the left side bar, click Indices settings you will see as the following screenshot:


9. Assign solr index to Magento store.

     Select which solrcore will be used for the store view for search query


10. Search fields, Facets fields, boost fields settings

-This is the important step, please thinking and select which fields you would like to display for filter on the search result page.

Note, every time you change these fields settings, It is a must to empty and reindex the whole solr index (step 12)

Please edit any magento attribute (Catalog > Attributes > Manage attributes), in the edit form scroll down to the bottom there will be a screen as below:


11. Run data indexing - send magento data to solr for indexing.

-Goto Solr Bridge > Solr Bridge Indexes

SolrBridge Indices Management

Shell script for data index in console (If you have problem with data index progress in Magento Admin as screenshot above):

        Go to directory shell under Magento root folder
              -To View information
                  php solrbridge.php -info
             -To empty solr data 
                  php solrbridge.php -truncate [english][german][...]
             Example: to empty data index of solr core german we can use:
                  php solrbridge.php -truncate german
            -To start index data
                  php solrbridge.php -updateindex [german][english][..]
            Example: to start indexing data for german core, we can use the following command
                  php solrbridge.php -updateindex german

  Waiting the progress show 100%, then it is ready to see result as in step 12

12. Test the search

Test Solr Bridge Search

13. Custom theme deployment

By default, Magento Solr Bridge works for the default template, so if you created and run Magento with a custom template please do the following:
1. Copy app\design\frontend\default\default\layout\solrsearch.xml
    to app\design\frontend\default\[YOUR TEMPLATE]\layout\
2. Copy app\design\frontend\default\default\template\solrsearch folder
    to app\design\frontend\default\YOUR TEMPLATE\template\solrsearch

14. Advanced settings for autocomplete

    By default Magento Solr Bridge use magento controller action to process and render autocomplete search but the speed is not so good because there a lot of things need to be loaded when Mangento process a request.

      So, there is a setting Use Advanced Autocomplete in SolrBridge > General settings, to use this setting please make sure the folder app/etc is writable (or create new file app/etc/solrbridge.conf and set the file permission to 777 ) before you set the setting to Yes.

If you have any problem during the installtion process or find any bug inside the extension please contact me so that i can support to solve issues:
Hau Danh

Skype: hau.danh
Email: [email protected] or [email protected]
Mobile Phone: +84925752737