Getting Started with Solr 1.4 Tutorial
Learn how to get started with Solr 1.4 with this useful video featuring Tom Hill, a Solr developer and trainer. Below, we have also included a quick Start Guide and a printed transcript of the video to help you get your Solr search platform up and running quickly.
Solr 1.4 Quick Start Guide
Solr is a search server. You can run it in any Java servlet container. If you're running a Java technology web app server already, then you already have a servlet container running. All you need to do is deploy Solr into your container.
To make things as simple as possible, however, you won't even need your own servlet container to work your way through this tutorial. Lucid Imagination’s LucidWorks Certified Distribution for Solr includes two servlet containers for you to choose from – either Jetty (a smaller small servlet container), or Tomcat (the more widely deployed, heavier-duty servlet container) -- which is what you need to get started with Solr.
Got Java?
Now, you will need is an up-to-date installation of the Java platform, version 1.5 or later. We highly recommend version 1.6 or later. If you elect to use version 1.5, be aware that a future version of Solr or LucidWorks might mandate Java version 1.6. Find out if you have the right one via command line. Here is the output on my machine:
~: java -version
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)
~:
If you don't have an appropriate Java platform, download and install the latest version from Sun:
http://java.sun.com/javase/downloads/index.jsp
Run Solr
Next, download the latest version of LucidWorks certified distribution for Solr. http://www.lucidimagination.com/Downloads/LucidWorks-for-Solr
In order to run the Installer, go to the same directory as the installation file, and launch the installer with:
~: java -jar SolrInstaller.jar
You will see the welcome screen.
For environments that do not support a graphical window system, like a headless Linux server, run the installer like this instead:
~: java -jar SolrInstaller.jar –console
Once the installation process is over, change directories to the example directory. This directory contains everything you need to run Solr with a simple schema suitable for an online store.
Run Solr with the following command (If you are a Windows user, you should run start.bat instead):
~/LucidWorks: start.sh 2009-01-06 07:44:44.734::INFO: Logging to STDERR via org.mortbay.log.StdErrLog 2009-01-06 07:44:44.887::INFO: jetty-6.1.3 .
You will see more messages on the console. When the dust settles and messages are no longer being printed, Solr is running.
The start.jar utility starts Solr inside the servlet container. Solr's home directory, which is where Solr expects to find configuration files and does its work, defaults to example/solr. If you're curious, take a look inside. In example/solr/conf are important configuration files, and example/solr/data is the place Solr keeps all its index information.
