SOLR 4.1 throws: Unknown commit 'waitFlush' option?

I am running Magento EE 1.11 and I have deployed SOLR 4.1 using tomcat7. I copied the solrconfig.xml and schema.xml file provided by Magento and fixed all the problems SOLR had with the two files, because they were for SOLR 3.6 and Magento configured correctly.

Now, when I revisit the Magneto search at the very last moment, SOLR spits out this exception:

org.apache.solr.common.SolrException: Unknown commit parameter 'waitFlush'

      

and Magento goes back to stating the need to re-index the search. Has anyone encountered this problem? From all the things I've done, there seems to be a patch for this, but where and how to apply it?

+3


source to share


1 answer


You should really be using SOLR 3.x instead of 4 with Magento EE.

Here's a walkthrough for setup and installation.

On Debian / Ubuntu

The simplest installation is pretty straightforward using tomcat

your package manager as well. Dependencies will run automatically.

apt-get install tomcat6

      

On CentOS / RedHat

You need to grab an alternative repo to make this possible

Eg.

rpm -Uvh http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

      

Then you can install the package from yum

yum install yum-priorities ant tomcat6 tomcat6-admin

cd /usr/src/
mkdir sun-java
cd sun-java

      

Now it gets a little tricky. The sun is used for direct loading; but now they have stupid session validation in place - so download the binary through your computer and download it to the computer.

You need both the JDK for Linux and the JRE.

The commands would be:

wget -O jdk.rpm.bin http://download.oracle.com/otn-pub/java/jdk/6u29-b11/jdk-6u29-linux-x64-rpm.bin
wget -O jre.rpm.bin http://download.oracle.com/otn-pub/java/jdk/6u29-b11/jre-6u29-linux-x64-rpm.bin

      

Alternatively you can use OpenJDK



wget http://jpackage.org/jpackage50.repo -O /etc/yum.repos.d/jpackage50.repo
yum install -y java-1.6.0-openjdk

      

Once you've downloaded the binaries

chmod +x *.bin
./jre.rpm.bin
./jdk.rpm.bin
ln -s /var/lib/tomcat6 /usr/share/tomcat6

      

Then the remaining steps

Then release the appropriate selection solr

mkdir /usr/src/solr
cd /usr/src/solr
wget http://mirrors.ukfast.co.uk/sites/ftp.apache.org/lucene/solr/3.6.1/apache-solr-3.6.1.tgz
tar xvfz apache-solr-3.6.1.tgz
cd apache-solr-3.6.1
cp dist/apache-solr-*.war /var/lib/tomcat6/webapps/solr.war
mkdir -p /var/lib/tomcat6/solr

      

Then add the Magento config solr

INSTALL_DIR="/var/lib/tomcat6/solr"
touch $INSTALL_DIR/solr.xml
CORES=( "staging" "development" "live" )
for CORE in "${CORES[@]}"; do
  mkdir -p $INSTALL_DIR/$CORE/conf $INSTALL_DIR/$CORE/data 
  cp -par /usr/src/solr/apache-solr-3.6.1/example/solr/conf/* $INSTALL_DIR/$CORE/conf
  cp -par /home/path/public_html/lib/Apache/Solr/Conf/* $INSTALL_DIR/$CORE/conf
done

      

Then install the kernels

cat > /var/lib/tomcat6/solr/solr.xml << EOF
<?xml version="1.0" encoding="UTF-8" ?>
<solr persistent="true" sharedLib="lib">
  <cores adminPath="/admin/cores">
    <core name="staging" instanceDir="staging" config="solrconfig.xml" schema="schema.xml" />
    <core name="development" instanceDir="development" config="solrconfig.xml" schema="schema.xml" />
    <core name="live" instanceDir="live" config="solrconfig.xml" schema="schema.xml" />
  </cores>
</solr>
EOF

      

Then finally clear the permissions and restart solr

chown -R tomcat6:tomcat6 /var/lib/tomcat6/solr
/etc/init.d/tomcat6 restart

      

Then in Magento, you have 3 possible independent cores that you can use for your stores.

  • staging/solr

  • development/solr

  • live/solr

Attribution: http://www.sonassi.com/knowledge-base/multiple-solr-cores-for-magento-on-debianubuntucentosredhat/

+2


source







All Articles