How To Set Up & Configure Solr Search in Magento Enterprise

Share On Facebook
Share On Twitter
Share On Linkedin

solr-searchSolr is a search engine that supports: stemming, plurals, replacements, layered navigation, etc. While it does not come included with Magento Enterprise, and must be installed separately, it has marked improvements to the standard Magento search features. Solr’s search engine has improved search performance, search results relevancy, layered navigation performance, and support for any spelling/synonyms/stop words that might occur.

In order to install it properly, you must have the four following .txt files:

  1. protwords.txt – This is used for “Protected Words.” This file protects against the stemmer, reducing two unreleated words to the same base word and clearing up your search feature
  2. spellings.txt – defines misspelled words and searches them appropriately
  3. stopwords.txt – incorporates any words that stop the search
  4. synonym.txt – provides synonyms in order to search more broadly

Quick Search

To enable Solr – System-> Configuration -> Catalog tab. Go to Search Engine tab, you will have to enter your Solr credentials. Save the config.

Note: Attribute search weight is one of the most important features of Solr, it is used to rank results back to for display.

Go to Catalog -> Attribute -> Manage Attributes in Frontend Properties set the following:

Search Engine – Solr must have already been set

Use in Quick Search – Yes to enable, no to disable.

Search weight – 1 is greatest (most important) 2 is least weight (least important)

If you need help with your Magento store, call 845-656-3000 or Contact us here »

Search Suggestions

System -> Configuration-> Catalog. Catalog Search tab. Enable Solr.

Set “Enable Search Suggestions” to yes

Set “Search Suggestions Count” to how many suggestions you would like

Set “Results Count for Each Suggestion – Yes to display the number of search results for each search suggestion.

Catalog Navigation

System -> Configuration -> Catalog tab.

Set “Enable Solr Engine for Catalog Navigation” to yes to use Solr instead of the MySQL Fulltext search to generate the layered results.

Related Terms Search Recommendations:

System -> Configuration -> Catalog

Enable Search Recommendations – Yes to use Solr instead of MySQL Fulltext search to generate the layered navigation.

Search Recommendations Count – specifies the number of words that will be provided to the customer as recommended terms related to customers search

Show Results Count for Each Recommendation – if yes, the # of products found for the proposed search recommendation is shown in brackets next to it.

Relating Search Terms: System -> Configuration. Searches Grid provides the list of all terms that have been searched by customers. Click on Any term. On the Edit Search page – to see all previously search terms click the [Reset Filter] button in the Related Searches grid. Find a related search term. Select the check boxes for all searches that you wish to add as a recommended search. Save.

Boost revenue and improve user experience by using Solr Search for online stores using Magento Enterprise. If you have a question about configuring Solr Search on your Magento store feel free to comment below.

Rate this post
  • Ron G.

    I’ve read PDF’s can be extracted & indexed into SOLR … (Tika, SOLRCell, SOLRJ, etc). Assuming that was done, do the search results (shown in magento) include those relevant docs too ? Is custom code needed to display them on Magento’s Search Results Page (or if I need to create a secondary results page just for the PDF “hits”, how do I pull the SOLR results into it – is there a table I can query ?

    • Eric Landmann

      My client has a similar requirement, and wants the results to also display in the AJAX search results. Is this supported?