A few days ago we tried to install and set Solr as a Magento default search system. We run into a weird problem: once we checked that Solr was working we enabled it in Magento. Everything seemed to work well: when reindexing products the log would show the changes and the button for testing whether Solr was connected with Magento said that it all was OK.

But when searching for products in Magento there were no results. The point was that what we got was a message saying that there were no results, but just above, there was a pagination and the number of results, that actually were greater than 0.

The Problem

After debugging a while, we found that there was an exception thrown by Solr: 413 Status: FULL head

Once we found out what the exception was, it was very easy to know what to do: we needed to increment the headerBufferSize parameter value in the jetty.xml file. Given that that paramenter wasn’t on our etc/jetty.xml file, we had to add it:

<!-- This connector is currently being used for Solr because it
showed better performance than nio.SelectChannelConnector
for typical Solr requests.  -->
<Call name="addConnector">
 <Arg>
  <New>
   <Set name="host"><SystemProperty name="jetty.host" /></Set>
   <Set name="port"><SystemProperty name="jetty.port" default="8983"/></Set>
   <Set name="maxIdleTime">50000</Set>
   <Set name="lowResourceMaxIdleTime">1500</Set>
   <Set name="statsOn">false</Set>
   <Set name="headerBufferSize">36384</Set>
  </New>
 </Arg>
</Call>

After changing this we started getting results in Magento. It’s important to note that when using the solr interface (from http://localhost:8983/solr/admin) it always worked perfectly.

Categories: Development

2 Comments

Oğuz Çelikdemir · April 5, 2012 at 9:49 pm

If you don’t mind, could you please share “Solr” experience with us? Fr instance, how you implement it to Magento? How you install i? etc…

    Pau · April 6, 2012 at 5:13 am

    Hi Oğuz,

    I’ll write an article about how installing Solr very soon. It’s very important to note that only the Magento Enterprise Edition comes with Solr compatibility.

    There are other options that I’ll talk about in that post (I have to do some research first 🙂 ).

    Thanks!

    Pau

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.