solr-8.9.0-src.tgz the package Solr source code. This is useful if you want to develop on Solr without using the official Git repository.
Preparing for Installation
When getting started with Solr, all you need to do is extract the Solr distribution archive to a directory of your choosing. This will suffice as an initial development environment, but take care not to overtax this "toy" installation before setting up your true development and production environments.
When you’ve progressed past initial evaluation of Solr, you’ll want to take care to plan your implementation. You may need to reinstall Solr on another server or make a clustered SolrCloud environment.
When you’re ready to setup Solr for a production environment, please refer to the instructions provided on the Taking Solr to Production page.
What Size Server Do I Need?
How to size your Solr installation is a complex question that relies on a number of factors, including the number and structure of documents, how many fields you intend to store, the number of users, etc.
One thing to note when planning your installation is that a hard limit exists in Lucene for the number of documents in a single index: approximately 2.14 billion documents (2,147,483,647 to be exact). In practice, it is highly unlikely that such a large number of documents would fit and perform well in a single index, and you will likely need to distribute your index across a cluster before you ever approach this number. If you know you will exceed this number of documents in total before you’ve even started indexing, it’s best to plan your installation with SolrCloud as part of your design from the start.
To keep things simple for now, extract the Solr distribution archive to your local home directory, for instance on Linux, do:
tar zxf solr-8.9.0.tgz
Once extracted, you are now ready to run Solr using the instructions provided in the Starting Solr section below.
After installing Solr, you’ll see the following directories and files within them:
This directory includes several important scripts that will make using Solr easier.
solr and solr.cmd
This is Solr’s Control Script, also known as bin/solr (*nix) / bin/solr.cmd (Windows). This script is the preferred tool to start and stop Solr. You can also create collections or cores, configure authentication, and work with configuration files when running in SolrCloud mode.
The PostTool, which provides a simple command line interface for POSTing content to Solr.
solr.in.sh and solr.in.cmd
These are property files for *nix and Windows systems, respectively. System-level properties for Java, Jetty, and Solr are configured here. Many of these settings can be overridden when using bin/solr / bin/solr.cmd, but this allows you to set all the properties in one place.
This script is used on *nix systems to install Solr as a service. It is described in more detail in the section Taking Solr to Production.
Solr’s contrib directory includes add-on plugins for specialized features of Solr.
The dist directory contains the main Solr .jar files.
The docs directory includes a link to online Javadocs for Solr.
The example directory includes several types of examples that demonstrate various Solr capabilities. See the section Solr Examples below for more details on what is in this directory.
The licenses directory includes all of the licenses for 3rd party libraries used by Solr.
This directory is where the heart of the Solr application resides. A README in this directory provides a detailed overview, but here are some highlights:
Solr’s Admin UI (server/solr-webapp)
Jetty libraries (server/lib)
Log files (server/logs) and log configurations (server/resources). See the section Configuring Logging for more details on how to customize Solr’s default logging.
Sample configsets (server/solr/configsets)
Solr includes a number of example documents and configurations to use when getting started. If you ran through the Solr Tutorial, you have already interacted with some of these files.
Here are the examples included with Solr:
This is a small set of simple CSV, XML, and JSON files that can be used with bin/post when first getting started with Solr. For more information about using bin/post with these files, see Post Tool.
This directory includes a few example DataImport Handler (DIH) configurations to help you get started with importing structured content in a database, an email server, or even an Atom feed. Each example will index a different set of data; see the README there for more details about these examples.
The files directory provides a basic search UI for documents such as Word or PDF that you may have stored locally. See the README there for details on how to use this example.
The films directory includes a robust set of data about movies in three formats: CSV, XML, and JSON. See the README there for details on how to use this dataset.
Solr includes a command line interface tool called bin/solr (Linux/MacOS) or bin\solr.cmd (Windows). This tool allows you to start and stop Solr, create cores and collections, configure authentication, and check the status of your system.
To use it to start Solr you can simply enter:
If you are running Windows, you can start Solr by running bin\solr.cmd instead.
This will start Solr in the background, listening on port 8983.
When you start Solr in the background, the script will wait to make sure Solr starts correctly before returning to the command line prompt.