13.05.2014 Views

apache-solr-ref-guide-4.6.pdf

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Getting Started<br />

Solr makes it easy for programmers to develop sophisticated, high-performance search applications with advanced features such as faceting<br />

(arranging search results in columns with numerical counts of key terms). Solr builds on another open source search technology: Lucene, a Java<br />

library that provides indexing and search technology, as well as spellchecking, hit highlighting and advanced analysis/tokenization capabilities.<br />

Both Solr and Lucene are managed by the Apache Software Foundation ( www.<strong>apache</strong>.org) .<br />

The Lucene search library currently ranks among the top 15 open source projects and is one of the top 5 Apache projects, with installations at<br />

over 4,000 companies. Lucene/Solr downloads have grown nearly ten times over the past three years, with a current run-rate of over 6,000<br />

downloads a day. The Solr search server, which provides application builders a ready-to-use search platform on top of the Lucene search library,<br />

is the fastest growing Lucene sub-project. Apache Lucene/Solr offers an attractive alternative to the proprietary licensed search and discovery<br />

software vendors.<br />

This section helps you get Solr up and running quickly, and introduces you to the basic Solr architecture and features. It covers the following<br />

topics:<br />

Installing Solr: A walkthrough of the Solr installation process.<br />

Running Solr: An introduction to running Solr. Includes information on starting up the servers, adding documents, and running queries.<br />

A Quick Overview: A high-level overview of how Solr works.<br />

A Step Closer: An introduction to Solr's home directory and configuration options.<br />

Installing Solr<br />

This section describes how to install Solr. You can install Solr anywhere that a suitable Java Runtime Environment (JRE) is available, as detailed<br />

below. Currently this includes Linux, OS X, and Microsoft Windows. The instructions in this section should work for any platform, with a few<br />

exceptions for Windows as noted.<br />

Got Java?<br />

You will need the Java Runtime Environment (JRE) version 1.6 or higher. At a command line, check your Java version like this:<br />

$ java -version<br />

java version "1.6.0_0"<br />

IcedTea6 1.3.1 (6b12-0ubuntu6.1) Runtime Environment (build 1.6.0_0-b12)<br />

OpenJDK Client VM (build 1.6.0_0-b12, mixed mode, sharing)<br />

The output will vary, but you need to make sure you have version 1.6 or higher. If you don't have the required version, or if the java command is<br />

not found, download and install the latest version from Sun at http://java.sun.com/javase/downloads/ .<br />

Installing Solr<br />

Solr is available from the Solr website at http://lucene.<strong>apache</strong>.org/<strong>solr</strong>/ .<br />

For Linux/Unix/OSX systems, download the .gzip file. For Microsoft Windows systems, download the .zip file.<br />

Solr runs inside a Java servlet container such as Tomcat, Jetty, or Resin. The Solr distribution includes a working demonstration server in the<br />

Example directory that runs in Jetty. You can use the example server as a template for your own installation, whether or not you are using Jetty<br />

as your servlet container. For more information about the demonstration server, see the Solr Tutorial.<br />

Solr ships with a working Jetty server, with optimized settings for Solr, inside the example directory. It is recommended that you<br />

use the provided Jetty server for optimal performance. If you absolutely must use a different servlet container then continue to<br />

the next section on how to install Solr.<br />

To install Solr<br />

1.<br />

2.<br />

3.<br />

Unpack the Solr distribution to your desired location.<br />

Stop your Java servlet container.<br />

Copy the <strong>solr</strong>.war file from the Solr distribution to the webapps directory of your servlet container. Do not change the name of this file:<br />

Apache Solr Reference Guide 4.6<br />

4

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!