2020-04-26 19:43:04 -04:00
|
|
|
<!--
|
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
|
|
this work for additional information regarding copyright ownership.
|
|
|
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
(the "License"); you may not use this file except in compliance with
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
2006-11-28 23:30:33 -05:00
|
|
|
|
2006-01-29 18:54:58 -05:00
|
|
|
Welcome to the Apache Solr project!
|
|
|
|
-----------------------------------
|
|
|
|
|
2011-03-10 21:11:44 -05:00
|
|
|
Solr is the popular, blazing fast open source enterprise search platform
|
|
|
|
from the Apache Lucene project.
|
2006-11-30 12:47:03 -05:00
|
|
|
|
2006-01-29 18:54:58 -05:00
|
|
|
For a complete description of the Solr project, team composition, source
|
2007-01-17 18:46:30 -05:00
|
|
|
code repositories, and other details, please see the Solr web site at
|
2020-04-26 19:43:04 -04:00
|
|
|
https://lucene.apache.org/solr
|
2006-01-29 18:54:58 -05:00
|
|
|
|
|
|
|
|
2006-12-15 14:53:10 -05:00
|
|
|
Getting Started
|
|
|
|
---------------
|
|
|
|
|
2020-09-06 17:15:56 -04:00
|
|
|
All the following commands are entered from the "solr" directory which should be just below the install directory
|
|
|
|
|
|
|
|
To start Solr for the first time after installation, simply enter:
|
2014-10-31 00:30:52 -04:00
|
|
|
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2014-12-08 11:43:08 -05:00
|
|
|
bin/solr start
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2014-10-31 00:30:52 -04:00
|
|
|
|
2015-01-12 18:33:34 -05:00
|
|
|
This will launch a standalone Solr server in the background of your shell,
|
|
|
|
listening on port 8983. Alternatively, you can launch Solr in "cloud" mode,
|
|
|
|
which allows you to scale out using sharding and replication. To launch Solr
|
2020-09-06 17:15:56 -04:00
|
|
|
in cloud mode, enter:
|
2014-10-31 00:30:52 -04:00
|
|
|
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2015-01-12 18:33:34 -05:00
|
|
|
bin/solr start -cloud
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2014-12-08 11:43:08 -05:00
|
|
|
|
2020-09-06 17:15:56 -04:00
|
|
|
To see all available options for starting Solr, please enter:
|
2014-12-08 11:43:08 -05:00
|
|
|
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2015-01-12 18:33:34 -05:00
|
|
|
bin/solr start -help
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2014-12-08 11:43:08 -05:00
|
|
|
|
2015-01-12 18:33:34 -05:00
|
|
|
After starting Solr, create either a core or collection depending on whether
|
2020-09-06 17:15:56 -04:00
|
|
|
Solr is running in standalone (core) or SolrCloud mode (collection) by entering:
|
2014-12-08 11:43:08 -05:00
|
|
|
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2015-01-24 14:00:09 -05:00
|
|
|
bin/solr create -c <name>
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2014-10-31 00:30:52 -04:00
|
|
|
|
2015-01-12 18:33:34 -05:00
|
|
|
This will create a collection that uses a data-driven schema which tries to guess
|
|
|
|
the correct field type when you add documents to the index. To see all available
|
2020-09-06 17:15:56 -04:00
|
|
|
options for creating a new collection, enter:
|
2014-10-31 00:30:52 -04:00
|
|
|
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2015-01-12 18:33:34 -05:00
|
|
|
bin/solr create -help
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2014-10-31 00:30:52 -04:00
|
|
|
|
|
|
|
After starting Solr, direct your Web browser to the Solr Admin Console at:
|
|
|
|
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2014-10-31 00:30:52 -04:00
|
|
|
http://localhost:8983/solr/
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2014-10-31 00:30:52 -04:00
|
|
|
|
2017-12-04 16:28:20 -05:00
|
|
|
When finished with your Solr installation, shut it down by executing:
|
|
|
|
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2017-12-04 16:28:20 -05:00
|
|
|
bin/solr stop -all
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2017-12-04 16:28:20 -05:00
|
|
|
|
|
|
|
The `-p PORT` option can also be used to identify the Solr instance to shutdown,
|
|
|
|
where more than one Solr is running on the machine.
|
|
|
|
|
2014-12-08 11:43:08 -05:00
|
|
|
|
|
|
|
Solr Examples
|
|
|
|
---------------
|
|
|
|
|
2020-09-06 17:15:56 -04:00
|
|
|
Solr includes a few examples to help you get started. To run a specific example, enter:
|
2014-12-08 11:43:08 -05:00
|
|
|
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2014-12-08 11:43:08 -05:00
|
|
|
bin/solr -e <EXAMPLE> where <EXAMPLE> is one of:
|
|
|
|
|
|
|
|
cloud : SolrCloud example
|
|
|
|
schemaless : Schema-less example (schema is inferred from data during indexing)
|
|
|
|
techproducts : Kitchen sink example providing comprehensive examples of Solr features
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2014-12-08 11:43:08 -05:00
|
|
|
|
2020-09-06 17:15:56 -04:00
|
|
|
For instance, if you want to run the SolrCloud example, enter:
|
2014-12-08 11:43:08 -05:00
|
|
|
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2020-08-29 10:52:04 -04:00
|
|
|
bin/solr -e cloud
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2014-12-08 11:43:08 -05:00
|
|
|
|
|
|
|
Indexing Documents
|
|
|
|
---------------
|
|
|
|
|
2015-01-26 10:27:50 -05:00
|
|
|
To add documents to the index, use bin/post. For example:
|
2014-10-31 00:30:52 -04:00
|
|
|
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2015-01-26 10:27:50 -05:00
|
|
|
bin/post -c <collection_name> example/exampledocs/*.xml
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2014-10-31 00:30:52 -04:00
|
|
|
|
|
|
|
For more information about Solr examples please read...
|
|
|
|
|
2020-04-26 19:43:04 -04:00
|
|
|
* [example/README.md](example/README.md)
|
|
|
|
|
|
|
|
For more information about the "Solr Home" and Solr specific configuration
|
|
|
|
|
2017-10-04 14:47:11 -04:00
|
|
|
* https://lucene.apache.org/solr/guide/solr-tutorial.html
|
2020-04-26 19:43:04 -04:00
|
|
|
|
|
|
|
For a Solr tutorial
|
|
|
|
|
|
|
|
* https://lucene.apache.org/solr/resources.html
|
|
|
|
|
|
|
|
For a list of other tutorials and introductory articles.
|
2014-10-31 00:30:52 -04:00
|
|
|
|
2012-09-20 17:52:47 -04:00
|
|
|
or linked from "docs/index.html" in a binary distribution.
|
2014-10-31 00:30:52 -04:00
|
|
|
|
2017-12-04 16:28:20 -05:00
|
|
|
Also, there are Solr clients for many programming languages, see
|
2020-04-26 19:43:04 -04:00
|
|
|
|
|
|
|
* https://wiki.apache.org/solr/IntegratingSolr
|
2006-12-15 14:53:10 -05:00
|
|
|
|
|
|
|
|
2011-03-10 21:11:44 -05:00
|
|
|
Files included in an Apache Solr binary distribution
|
|
|
|
----------------------------------------------------
|
|
|
|
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2014-10-31 00:30:52 -04:00
|
|
|
server/
|
|
|
|
A self-contained Solr instance, complete with a sample
|
|
|
|
configuration and documents to index. Please see: bin/solr start -help
|
|
|
|
for more information about starting a Solr server.
|
|
|
|
|
2011-03-10 21:11:44 -05:00
|
|
|
example/
|
2014-10-31 00:30:52 -04:00
|
|
|
Contains example documents and an alternative Solr home
|
2020-08-29 10:52:04 -04:00
|
|
|
directory containing various examples.
|
2006-12-15 14:53:10 -05:00
|
|
|
|
2013-01-12 12:51:57 -05:00
|
|
|
dist/solr-<component>-XX.jar
|
2012-12-12 21:52:54 -05:00
|
|
|
The Apache Solr libraries. To compile Apache Solr Plugins,
|
|
|
|
one or more of these will be required. The core library is
|
|
|
|
required at a minimum. (see http://wiki.apache.org/solr/SolrPlugins
|
|
|
|
for more information).
|
2006-12-15 14:53:10 -05:00
|
|
|
|
2012-09-20 17:52:47 -04:00
|
|
|
docs/index.html
|
2017-02-23 09:43:45 -05:00
|
|
|
A link to the online version of Apache Solr Javadoc API documentation and Tutorial
|
2020-04-26 19:43:04 -04:00
|
|
|
```
|
2006-12-15 14:53:10 -05:00
|
|
|
|
|
|
|
Instructions for Building Apache Solr from Source
|
|
|
|
-------------------------------------------------
|
2006-01-29 18:54:58 -05:00
|
|
|
|
2019-04-16 08:00:09 -04:00
|
|
|
1. Download the Java 11 JDK (Java Development Kit) or later from https://jdk.java.net/
|
2017-12-04 16:28:20 -05:00
|
|
|
You will need the JDK installed, and the $JAVA_HOME/bin (Windows: %JAVA_HOME%\bin)
|
|
|
|
folder included on your command path. To test this, issue a "java -version" command
|
2019-04-16 08:00:09 -04:00
|
|
|
from your shell (command prompt) and verify that the Java version is 11 or later.
|
2011-05-03 08:46:39 -04:00
|
|
|
|
2020-08-28 09:31:16 -04:00
|
|
|
2. Download the Apache Solr distribution, linked from the above web site.
|
2011-05-03 08:46:39 -04:00
|
|
|
Unzip the distribution to a folder of your choice, e.g. C:\solr or ~/solr
|
2006-12-15 15:21:11 -05:00
|
|
|
Alternately, you can obtain a copy of the latest Apache Solr source code
|
2016-02-21 19:10:44 -05:00
|
|
|
directly from the GIT repository:
|
2006-12-15 15:21:11 -05:00
|
|
|
|
2020-08-28 09:31:16 -04:00
|
|
|
https://lucene.apache.org/solr/community.html#version-control
|
2006-01-29 18:54:58 -05:00
|
|
|
|
2020-08-28 09:31:16 -04:00
|
|
|
3. Navigate to the root of your source tree folder and issue the `./gradlew tasks`
|
|
|
|
command to see the available options for building, testing, and packaging Solr.
|
2009-07-27 15:14:01 -04:00
|
|
|
|
2020-08-28 09:31:16 -04:00
|
|
|
`./gradlew assemble` will create a Solr executable.
|
|
|
|
cd to "./solr/packaging/build/solr-9.0.0-SNAPSHOT" and run the bin/solr script
|
|
|
|
to start Solr.
|
|
|
|
|
2020-09-06 17:15:56 -04:00
|
|
|
NOTE: `gradlew` is the "Gradle Wrapper" and will automatically download and
|
2020-08-28 09:31:16 -04:00
|
|
|
start using the correct version of Gradle.
|
2020-09-06 17:15:56 -04:00
|
|
|
|
|
|
|
NOTE: `./gradlew help` will print a list of high-level tasks. There are also a
|
|
|
|
number of plain-text files in <source folder root>/help.
|
|
|
|
|
|
|
|
NOTE: This CWiki page describes getting/building/testing Solr
|
|
|
|
in more detail:
|
|
|
|
`https://cwiki.apache.org/confluence/display/solr/HowToContribute`
|
2009-07-27 15:14:01 -04:00
|
|
|
|
|
|
|
Export control
|
|
|
|
-------------------------------------------------
|
|
|
|
This distribution includes cryptographic software. The country in
|
|
|
|
which you currently reside may have restrictions on the import,
|
|
|
|
possession, use, and/or re-export to another country, of
|
|
|
|
encryption software. BEFORE using any encryption software, please
|
|
|
|
check your country's laws, regulations and policies concerning the
|
|
|
|
import, possession, or use, and re-export of encryption software, to
|
|
|
|
see if this is permitted. See <http://www.wassenaar.org/> for more
|
|
|
|
information.
|
|
|
|
|
|
|
|
The U.S. Government Department of Commerce, Bureau of Industry and
|
|
|
|
Security (BIS), has classified this software as Export Commodity
|
|
|
|
Control Number (ECCN) 5D002.C.1, which includes information security
|
|
|
|
software using or performing cryptographic functions with asymmetric
|
|
|
|
algorithms. The form and manner of this Apache Software Foundation
|
|
|
|
distribution makes it eligible for export under the License Exception
|
|
|
|
ENC Technology Software Unrestricted (TSU) exception (see the BIS
|
|
|
|
Export Administration Regulations, Section 740.13) for both object
|
|
|
|
code and source code.
|
|
|
|
|
|
|
|
The following provides more details on the included cryptographic
|
|
|
|
software:
|
2020-04-26 19:43:04 -04:00
|
|
|
|
|
|
|
Apache Solr uses the Apache Tika which uses the Bouncy Castle generic encryption libraries for
|
|
|
|
extracting text content and metadata from encrypted PDF files.
|
|
|
|
See http://www.bouncycastle.org/ for more details on Bouncy Castle.
|