Skip to content

Commit fd6259a

Browse files
epughjanhoyHoustonPutman
committed
SOLR-15242: Consolidate README.md with solr/README.md (#610)
Consolidate the ./README.md and ./solr/README.md into a new top level README.md optimized for Github. The /solr/README.adoc is now to help a developer understand what the subdirectories are all about. Introduced a new README.txt in the ./solr/packaging directory to ship with the distributions. Co-authored-by: [email protected] <> Co-authored-by: Jan Høydahl <[email protected]> Co-authored-by: Houston Putman <[email protected]>
1 parent b3061c8 commit fd6259a

File tree

13 files changed

+463
-343
lines changed

13 files changed

+463
-343
lines changed

README.md

Lines changed: 41 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -15,143 +15,74 @@
1515
limitations under the License.
1616
-->
1717

18-
# Apache Solr
18+
# Welcome to the Apache Solr project!
19+
-----------------------------------
1920

20-
Apache Solr is an enterprise search platform written in Java and using [Apache Lucene](https://lucene.apache.org/).
21-
Major features include full-text search, index replication and sharding, and
22-
result faceting and highlighting.
21+
Solr is the popular, blazing fast open source search platform for all your
22+
enterprise, e-commerce, and analytics needs, built on [Apache Lucene](https://lucene.apache.org/).
2323

24+
For a complete description of the Solr project, team composition, source
25+
code repositories, and other details, please see the Solr web site at
26+
https://solr.apache.org/solr
2427

25-
[![Build Status](https://ci-builds.apache.org/job/Solr/job/Solr-Artifacts-main/badge/icon?subject=Solr)](https://ci-builds.apache.org/job/Solr/job/Solr-Artifacts-main/)
28+
## Download
2629

27-
28-
## Online Documentation
29-
30-
This README file only contains basic setup instructions. For more
31-
comprehensive documentation, visit <https://solr.apache.org/guide/solr>
32-
33-
## Building with Gradle
34-
35-
Firstly, you need to set up your development environment (OpenJDK 11 or greater).
36-
37-
We'll assume that you know how to get and set up the JDK - if you
38-
don't, then we suggest starting at https://jdk.java.net/ and learning
39-
more about Java, before returning to this README. Solr runs with
40-
Java 11 and later.
41-
42-
As of 9.0, Solr uses [Gradle](https://gradle.org/) as the build
43-
system. Ant build support has been removed.
44-
45-
To build Solr, run (`./` can be omitted on Windows):
46-
47-
`./gradlew assemble`
48-
49-
NOTE: DO NOT use `gradle` command that is already installed on your machine (unless you know what you'll do).
50-
The "gradle wrapper" (gradlew) does the job - downloads the correct version of it, setups necessary configurations.
51-
52-
The first time you run Gradle, it will create a file "gradle.properties" that
53-
contains machine-specific settings. Normally you can use this file as-is, but it
54-
can be modified if necessary.
55-
56-
The command above packages a full distribution of Solr server; the
57-
package can be located at:
58-
59-
`solr/packaging/build/solr-*`
60-
61-
Note that the gradle build does not create or copy binaries throughout the
62-
source repository so you need to switch to the packaging output folder above;
63-
the rest of the instructions below remain identical. The packaging directory
64-
is rewritten on each build.
65-
66-
For development, especially when you have created test indexes etc, use
67-
the `./gradlew dev` task which will copy binaries to `./solr/packaging/build/dev`
68-
but _only_ overwrite the binaries which will preserve your test setup.
69-
70-
If you want to build the documentation, type `./gradlew -p solr documentation`.
30+
Downloads for Apache Solr distributions are available at https://solr.apache.org/downloads.html.
7131

7232
## Running Solr
7333

74-
After building Solr, the server can be started using
75-
the `bin/solr` control scripts. Solr can be run in either standalone or
76-
clustered (SolrCloud mode).
77-
78-
To run Solr in standalone mode, run the following command from the `solr/`
79-
directory:
34+
### Installing Solr
8035

81-
`bin/solr start`
82-
83-
To run Solr in clustered mode, run the following command from the `solr/`
84-
directory:
85-
86-
`bin/solr start -c`
87-
88-
The `bin/solr` control script allows heavy modification of the started Solr.
89-
Common options are described in some detail in solr/README.txt. For an
90-
exhaustive treatment of options, run `bin/solr start -h` from the `solr/`
91-
directory.
36+
The Reference Guide contains an entire [Deployment Guide](https://solr.apache.org/guide/solr/latest/deployment-guide/system-requirements.html) to walk you through installing Solr.
9237

9338
### Running Solr in Docker
9439

9540
You can run Solr in Docker via the [official image](https://hub.docker.com/_/solr).
96-
97-
To run Solr in a container and expose the Solr port, run:
98-
99-
`docker run -p 8983:8983 solr`
100-
101-
In order to start Solr in clustered mode, run the following.
102-
103-
`docker run -p 8983:8983 solr solr-fg -c`
104-
105-
For documentation on using the official docker builds, please refer to the [DockerHub page](https://hub.docker.com/_/solr).
106-
Up to date documentation for running locally built images of this branch can be found in the [local reference guide](solr/solr-ref-guide/modules/deployment-guide/pages/solr-in-docker.adoc).
107-
108-
There is also a gradle task for building custom Solr images from your local checkout.
109-
These local images are built identically to the official image except for retrieving the Solr artifacts locally instead of from the official release.
110-
This can be useful for testing out local changes as well as creating custom images for yourself or your organization.
111-
The task will output the image name to use at the end of the build.
112-
113-
`./gradlew docker`
114-
115-
For more info on building an image, run:
116-
117-
`./gradlew helpDocker`
118-
119-
Docker images can also be built from the Solr binary distribution (i.e. `solr-<version>.tgz`).
120-
Please refer to the [Solr Docker README](solr/docker/README.md) for more information.
41+
Learn more about [Solr in Docker](https://solr.apache.org/guide/solr/latest/deployment-guide/solr-in-docker.html)
12142

12243
### Running Solr on Kubernetes
12344

12445
Solr has official support for running on Kubernetes, in the official Docker image.
12546
Please refer to the [Solr Operator](https://solr.apache.org/operator) home for details, tutorials and instructions.
12647

127-
### Gradle build and IDE support
48+
## How to Use
49+
50+
Solr includes a few examples to help you get started. To run a specific example, enter:
12851

129-
- *IntelliJ* - IntelliJ idea can import the project out of the box.
130-
Code formatting conventions should be manually adjusted.
131-
- *Eclipse* - Not tested.
132-
- *Netbeans* - Not tested.
52+
```
53+
bin/solr start -e <EXAMPLE> where <EXAMPLE> is one of:
54+
cloud: SolrCloud example
55+
techproducts: Comprehensive example illustrating many of Solr's core capabilities
56+
schemaless: Schema-less example (schema is inferred from data during indexing)
57+
films: Example of starting with _default configset and adding explicit fields dynamically
58+
```
13359

60+
For instance, if you want to run the techproducts example, enter:
13461

135-
### Gradle build and tests
62+
```
63+
bin/solr start -e techproducts
64+
```
13665

137-
`./gradlew assemble` will build a runnable Solr as noted above.
66+
For a more in-depth introduction, please check out the [tutorials in the Solr Reference
67+
Guide](https://solr.apache.org/guide/solr/latest/getting-started/solr-tutorial.html).
13868

139-
`./gradlew check` will assemble Solr and run all validation
140-
tasks unit tests.
14169

142-
`./gradlew help` will print a list of help commands for high-level tasks. One
143-
of these is `helpAnt` that shows the gradle tasks corresponding to ant
144-
targets you may be familiar with.
70+
## Support
14571

146-
## Contributing
72+
- [Users Mailing List](https://solr.apache.org/community.html#mailing-lists-chat)
73+
- Slack: Solr Community Channel. Sign up at https://s.apache.org/solr-slack
74+
- IRC: `#solr` on [libera.chat](https://web.libera.chat/?channels=#solr)
14775

148-
Please review the [Contributing to Solr
149-
Guide](https://cwiki.apache.org/confluence/display/solr/HowToContribute) for information on
150-
contributing.
15176

152-
## Discussion and Support
77+
## Get Involved
78+
Please review the [Contributing to Solr Guide](https://cwiki.apache.org/confluence/display/solr/HowToContribute)
79+
for information on contributing.
80+
81+
To get involved in the developer community:
15382

15483
- [Mailing Lists](https://solr.apache.org/community.html#mailing-lists-chat)
84+
- Slack: `#solr-dev` in the `the-asf` organization. Sign up at https://the-asf.slack.com/messages/CE70MDPMF
15585
- [Issue Tracker (JIRA)](https://issues.apache.org/jira/browse/SOLR)
156-
- IRC: `#solr` and `#solr-dev` on libera.chat
157-
- [Slack](https://solr.apache.org/community.html#slack)
86+
- IRC: `#solr-dev` on [libera.chat](https://web.libera.chat/?channels=#solr-dev)
87+
88+
Learn more about developing Solr by reading through the developer docs in [./dev-docs](./dev-docs) source tree.

dev-docs/FAQ.adoc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,32 @@ branch to avoid extra mailing list traffic etc.
1919
Periodically review https://github.com/apache/solr/branches/all to see if you have
2020
created a branch that can be deleted.
2121

22+
=== Running Solr in Docker
23+
24+
You can run Solr in Docker via the [official image](https://hub.docker.com/_/solr).
25+
26+
To run Solr in a container and expose the Solr port, run:
27+
28+
`docker run -p 8983:8983 solr`
29+
30+
In order to start Solr in cloud mode, run the following.
31+
32+
`docker run -p 8983:8983 solr solr-fg -c`
33+
34+
For documentation on using the official docker builds, please refer to the [DockerHub page](https://hub.docker.com/_/solr).
35+
Up to date documentation for running locally built images of this branch can be found in the [local reference guide](solr/solr-ref-guide/src/running-solr-in-docker.adoc).
36+
37+
There is also a gradle task for building custom Solr images from your local checkout.
38+
These local images are built identically to the official image except for retrieving the Solr artifacts locally instead of from the official release.
39+
This can be useful for testing out local changes as well as creating custom images for yourself or your organization.
40+
The task will output the image name to use at the end of the build.
41+
42+
`./gradlew docker`
43+
44+
For more info on building an image, run:
45+
46+
`./gradlew helpDocker`
47+
2248
=== Whats the fastest build lifecycle for frontend work on Solr Admin?
2349

2450
Run `gradle dev`, and then `cd ./packaging/build/dev/`. Fire up your cluster

dev-docs/README.adoc

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,84 @@ However, the Ref Guide hosts it's own documentation on how to write Ref Guide co
2929
3030
There are a number of tools related to doing development on Solr available in the `/dev-tools`
3131
directory.
32+
33+
## Building Solr from Source
34+
Download the Java 11 JDK (Java Development Kit) or later. We recommend the OpenJDK
35+
distribution Eclipse Temurin available from https://adoptium.net/.
36+
You will need the JDK installed, and the $JAVA_HOME/bin (Windows: %JAVA_HOME%\bin)
37+
folder included on your command path. To test this, issue a "java -version" command
38+
from your shell (command prompt) and verify that the Java version is 11 or later.
39+
40+
Download the Apache Solr distribution, from https://solr.apache.org/downloads.html.
41+
Unzip the distribution to a folder of your choice, e.g. C:\solr or ~/solr
42+
Alternately, you can obtain a copy of the latest Apache Solr source code
43+
directly from the Git repository:
44+
45+
<https://solr.apache.org/community.html#version-control>
46+
47+
Solr uses [Gradle](https://gradle.org/) as the build
48+
system. Navigate to the root of your source tree folder and issue the `./gradlew tasks`
49+
command to see the available options for building, testing, and packaging Solr.
50+
51+
`./gradlew dev` will create a Solr executable suitable for development.
52+
cd to `./solr/packaging/build/dev` and run the `bin/solr` script
53+
to start Solr.
54+
55+
NOTE: `gradlew` is the "Gradle Wrapper" and will automatically download and
56+
start using the correct version of Gradle for Solr.
57+
58+
NOTE: `./gradlew help` will print a list of high-level tasks. There are also a
59+
number of plain-text files in <source folder root>/help.
60+
61+
The first time you run Gradle, it will create a file "gradle.properties" that
62+
contains machine-specific settings. Normally you can use this file as-is, but it
63+
can be modified if necessary.
64+
65+
Note as well that the gradle build does not create or copy binaries throughout the
66+
source repository so you need to switch to the packaging output folder `./solr/packaging/build`;
67+
the rest of the instructions below remain identical. The packaging directory
68+
is rewritten on each build.
69+
70+
If you want to build the documentation, type `./gradlew -p solr documentation`.
71+
72+
`./gradlew check` will assemble Solr and run all validation tasks unit tests.
73+
74+
To build the final Solr artifacts run `./gradlew assemble`.
75+
76+
Lastly, there is developer oriented documentation in `./dev-docs/README.adoc` that
77+
you may find useful in working with Solr.
78+
79+
80+
### Gradle build and IDE support
81+
82+
- *IntelliJ* - IntelliJ idea can import the project out of the box.
83+
Code formatting conventions should be manually adjusted.
84+
- *Eclipse* - Not tested.
85+
- *Netbeans* - Not tested.
86+
87+
88+
### Running Solr in Docker
89+
90+
You can run Solr in Docker via the [official image](https://hub.docker.com/_/solr).
91+
92+
To run Solr in a container and expose the Solr port, run:
93+
94+
`docker run -p 8983:8983 solr`
95+
96+
In order to start Solr in cloud mode, run the following.
97+
98+
`docker run -p 8983:8983 solr solr-fg -c`
99+
100+
For documentation on using the official docker builds, please refer to the [DockerHub page](https://hub.docker.com/_/solr).
101+
Up to date documentation for running locally built images of this branch can be found in the [local reference guide](solr/solr-ref-guide/src/running-solr-in-docker.adoc).
102+
103+
There is also a gradle task for building custom Solr images from your local checkout.
104+
These local images are built identically to the official image except for retrieving the Solr artifacts locally instead of from the official release.
105+
This can be useful for testing out local changes as well as creating custom images for yourself or your organization.
106+
The task will output the image name to use at the end of the build.
107+
108+
`./gradlew docker`
109+
110+
For more info on building an image, run:
111+
112+
`./gradlew helpDocker`

solr/README.adoc

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
////
2+
Licensed to the Apache Software Foundation (ASF) under one or more
3+
contributor license agreements. See the NOTICE file distributed with
4+
this work for additional information regarding copyright ownership.
5+
The ASF licenses this file to You under the Apache License, Version 2.0
6+
(the "License"); you may not use this file except in compliance with
7+
the License. You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
////
17+
18+
== Solr Source Directories
19+
20+
link:benchmark/[]::
21+
Benchmarking module for Solr.
22+
23+
link:bin/[]::
24+
Scripts to startup, manage and interact with Solr instances.
25+
26+
link:core/[]::
27+
Base Solr code.
28+
29+
link:distribution/[]::
30+
Gradle project for building a full release of Solr.
31+
32+
link:docker/[]::
33+
Contains a Dockerfile to build a Docker image using the source or binary distribution.
34+
`docker/scripts` contains scripts that the Docker image uses to manage Solr.
35+
36+
link:documentation/[]::
37+
Gradle project to build the JavaDocs site.
38+
39+
link:example/[]::
40+
Contains example documents and an alternative Solr home
41+
directory containing various examples.
42+
43+
link:license/[]::
44+
Licenses, notice files and signatures for Solr dependencies.
45+
46+
link:modules/[]::
47+
Contains modules to extend the functionality of Solr.
48+
49+
link:packaging/[]::
50+
Gradle project to build the binary release of Solr.
51+
52+
link:prometheus-exporter/[]::
53+
Contains a separate application to monitor Solr instances and export Prometheus metrics.
54+
55+
link:server/[]::
56+
Gradle project that builds the Jetty server to run Solr.
57+
58+
link:solr-ref-guide/[]::
59+
The Solr Reference Guide source files including Java examples.
60+
61+
link:solrj/[]::
62+
Solr client code for Java applications.
63+
64+
link:test-framework/[]::
65+
Solr test framework for internal tests and external tests integrating Solr.
66+
67+
link:webapp/[]::
68+
Admin UI Javascript and supporting assets.

0 commit comments

Comments
 (0)