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.
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.