Install java development kit preferably version 1.6 or greater.
As a complete web dev environment for windows i recommend using XAMPP. It comes with built in Tomcat servlet, so you won’t have to waste your time installing tomcat. Well regarding version of tomcat, i have successfully tested solr on tomcat 5,6 and 7.
Tomcat can be managed from xampp control panel or you can install it as a windows service so that it can be run independently from xampp. Well doesn’t matter much whether it is xampp service or a windows service. To install it as a windows service run the ‘service‘ batch file in c:\xampp\tomcat\bin .
After installation to check if tomcat is running open you browser and ping
3) Solr install
Download the latest solr release which is currently solr 3.6. Download the tarball fromhere and extract it to say downloads\apache-solr-3.6.0
- Make a new directory in C:\ and name it solr.
- Copy dist and contrib directories from downloads\apache-solr-3.6.0 i.e.downloads\apache-solr-3.6.0\dist and downloads\apache-solr-3.6.0\contrib toC:\solr\dist and C:\solr\contrib
- Make a directory named solr inside C:\solr and copy downloads\apache-solr-3.6.0\example directory contents to it. Now C:\solr\solr is what is called solr home.
- Copy downloads\apache-solr-3.6.0\dist\apache-solr-3.6.0.war file toC:\xampp\tomcat\webapps directory and rename it to solr. If tomcat service is on you will find that a solr directory is automatically created. If tomcat is off don’t bother it would be created next time tomcat starts.
That’s it. Solr is installed and now it can be used to do fast searching on huge amount of data from any source be it a sql database or a file. But to do that a lot of work still needs to be done related to request handlers and schemas. In the future posts i will be talking about the internals of solr.
Notation: if you want to query solr with json data please add &wt=json in the end of line