One of the key components in WebSphere Commerce 7, was the release in Feature Pack 2 of the SOLR search technology. For anyone familiar a decent search in the Commerce product, without the need to but another piece of software or integrate yourself has been a long time coming. Look out for Feature Pack 3 as well, with more SOLR functions about to be released plus better integration with Coremetrics for tracking your searches. There are going to be two places you will want to setup SOLR, one the development environment and the second the server side.
I wanted to setup a development environment with SOLR and although a lot of this info is taken from the V7 info Centre, it left me puzzling about the actual steps to perform. This was from the point of view of installing Feature Pack 2 and what I then needed to do to see SOLR in action.
1.) I started with a clean install of the WC Toolkit for V7 that was installed into the latest RAD version (7.5.5.3 iFix001), using the IBM installation manger.
2.) I applied Fixpack 7.0.0.2 onto this environment, again using the Installation manager.
3.) I then applied Feature Pack 2 for V7 and again used the Installation manager. this gave me the option of which features to install and I selected “All” of them to be applied to the environment. This was the step that was now a little confusing because I knew from the server installation that I had processes to do with SOLR, after enabling the foundation feature. But when you read the IC it is not clear what point you are now at with the environment.
4.) I looked at the following link, for Deploying WebSphere Commerce Search Locally. This page had been linked to from enabling the foundation feature, so did the fact that I had enabled the feature mean it was complete? The answer is yes you have no need to do this step if you enabled features from IBM Installation manager tool. I started up my commerce server within the development environment and was able to run the request “http://localhost/solr/Default/select?q=*%3A*” and get the correct response.
5.) Now I needed to run the setupSearchIndex.bat -masterCatalogId 10001 command for the Madisons FEAP 2 store I have created. What I did find is that I now must stop the commerce server in the development environment otherwise the Apache database is locked and it will not run.
6.) Now run the di-preprocess.bat file against the search index, again I kept the server stopped at this point.
7.) Finally I ran the di-buildindex.bat -masterCatalogId 10001 this command needs to talk to the SOLR environment, so you must have your server started when it runs. It will also take a while to run depending on the data you have compared to the other two commands.
8.) Once that is there you should now be able to access your development environment store and see it displayed with the SOLR. One thing I have found though is that if you have SOLR enabled and even with the Apache database I have started to see Out of Memory errors occurring in the environment.