2017-06-27 18:04:15 -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.
|
|
|
|
-->
|
|
|
|
|
2021-03-10 05:33:47 -05:00
|
|
|
# Apache Lucene
|
2017-06-27 18:04:15 -04:00
|
|
|
|
2021-03-10 15:28:52 -05:00
|
|
|
![Lucene Logo](https://lucene.apache.org/theme/images/lucene/lucene_logo_green_300.png?v=0e493d7a)
|
|
|
|
|
2017-06-27 18:04:15 -04:00
|
|
|
Apache Lucene is a high-performance, full featured text search engine library
|
|
|
|
written in Java.
|
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
[![Build Status](https://ci-builds.apache.org/job/Lucene/job/Lucene-Artifacts-master/badge/icon?subject=Lucene)](https://ci-builds.apache.org/job/Lucene/job/Lucene-Artifacts-master/)
|
2019-06-29 08:01:54 -04:00
|
|
|
|
2017-06-27 18:04:15 -04:00
|
|
|
## Online Documentation
|
|
|
|
|
|
|
|
This README file only contains basic setup instructions. For more
|
|
|
|
comprehensive documentation, visit:
|
|
|
|
|
|
|
|
- Lucene: <http://lucene.apache.org/core/documentation.html>
|
|
|
|
|
2020-09-07 06:08:38 -04:00
|
|
|
## Building with Gradle
|
2017-06-27 18:04:15 -04:00
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
### Basic steps:
|
|
|
|
|
|
|
|
0. Install OpenJDK 11 (or greater)
|
|
|
|
1. Download Lucene from Apache and unpack it
|
|
|
|
2. Connect to the top-level of your installation (parent of the lucene top-level directory)
|
|
|
|
3. Run gradle
|
2017-06-27 18:04:15 -04:00
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
### Step 0) Set up your development environment (OpenJDK 11 or greater)
|
2020-09-07 06:08:38 -04:00
|
|
|
|
|
|
|
We'll assume that you know how to get and set up the JDK - if you
|
|
|
|
don't, then we suggest starting at https://www.oracle.com/java/ and learning
|
2021-03-10 10:10:06 -05:00
|
|
|
more about Java, before returning to this README. Lucene runs with
|
2020-09-07 06:08:38 -04:00
|
|
|
Java 11 and later.
|
2020-01-09 06:36:40 -05:00
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
Lucene uses [Gradle](https://gradle.org/) for build control.
|
2020-01-09 06:36:40 -05:00
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
NOTE: Lucene changed from Ant to Gradle as of release 9.0. Prior releases
|
|
|
|
still use Ant.
|
2020-01-09 06:36:40 -05:00
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
### Step 1) Checkout/Download Lucene source code
|
2020-01-09 06:36:40 -05:00
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
We'll assume you already did this, or you wouldn't be reading this
|
|
|
|
file. However, you might have received this file by some alternate
|
|
|
|
route, or you might have an incomplete copy of the Lucene, so: you
|
|
|
|
can directly checkout the source code from GitHub:
|
2020-09-07 06:08:38 -04:00
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
https://github.com/apache/lucene
|
|
|
|
|
|
|
|
Or Lucene source archives at particlar releases are available as part of Lucene downloads:
|
2020-08-28 09:31:16 -04:00
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
https://lucene.apache.org/core/downloads.html
|
2020-01-09 06:36:40 -05:00
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
Download either a zip or a tarred/gzipped version of the archive, and
|
|
|
|
uncompress it into a directory of your choice.
|
2020-01-09 06:36:40 -05:00
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
### Step 2) Change directory (cd) into the top-level directory of the source tree
|
2020-08-28 09:31:16 -04:00
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
The parent directory for Lucene contains the base configuration file for the build.
|
|
|
|
By default, you do not need to change any of the settings in this file, but you do
|
|
|
|
need to run Gradle from this location so it knows where to find the necessary
|
|
|
|
configurations.
|
2020-01-09 06:36:40 -05:00
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
### Step 3) Run Gradle
|
2020-09-07 06:08:38 -04:00
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
Assuming you can exectue "./gradlew help" should show you the main tasks that
|
|
|
|
can be executed to show help sub-topics.
|
2017-06-27 18:04:15 -04:00
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
If you want to build Lucene, type:
|
2017-06-27 18:04:15 -04:00
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
```
|
|
|
|
./gradlew assemble
|
|
|
|
```
|
2017-06-27 18:04:15 -04:00
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
NOTE: DO NOT use `gradle` command that is already installed on your machine (unless you know what you'll do).
|
|
|
|
The "gradle wrapper" (gradlew) does the job - downloads the correct version of it, setups necessary configurations.
|
2017-06-27 18:04:15 -04:00
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
The first time you run Gradle, it will create a file "gradle.properties" that
|
|
|
|
contains machine-specific settings. Normally you can use this file as-is, but it
|
|
|
|
can be modified if necessary.
|
2017-06-27 18:04:15 -04:00
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
`./gradlew check` will assemble Lucene and run all validation
|
|
|
|
tasks unit tests.
|
2017-06-27 18:04:15 -04:00
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
`./gradlew help` will print a list of help commands for high-level tasks. One
|
|
|
|
of these is `helpAnt` that shows the gradle tasks corresponding to ant
|
|
|
|
targets you may be familiar with.
|
|
|
|
|
|
|
|
If you want to build the documentation, type:
|
|
|
|
|
|
|
|
```
|
|
|
|
./gradlew documentation
|
|
|
|
```
|
2017-06-27 18:04:15 -04:00
|
|
|
|
2020-01-09 06:36:40 -05:00
|
|
|
### Gradle build and IDE support
|
|
|
|
|
|
|
|
- *IntelliJ* - IntelliJ idea can import the project out of the box.
|
|
|
|
Code formatting conventions should be manually adjusted.
|
|
|
|
- *Eclipse* - Not tested.
|
|
|
|
- *Netbeans* - Not tested.
|
2017-06-27 18:04:15 -04:00
|
|
|
|
|
|
|
## Contributing
|
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
Please review the [Contributing to Lucene
|
|
|
|
Guide](https://cwiki.apache.org/confluence/display/lucene/HowToContribute) for information on
|
2017-06-27 18:04:15 -04:00
|
|
|
contributing.
|
|
|
|
|
|
|
|
## Discussion and Support
|
|
|
|
|
2021-03-10 10:10:06 -05:00
|
|
|
- [Users Mailing List](https://lucene.apache.org/core/discussion.html#java-user-list-java-userluceneapacheorg)
|
|
|
|
- [Developers Mailing List](https://lucene.apache.org/core/discussion.html#developer-lists)
|
|
|
|
- [Issue Tracker](https://issues.apache.org/jira/browse/LUCENE)
|
|
|
|
- IRC: `#lucene` and `#lucene-dev` on freenode.net
|