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 17:52:29 -05:00
|
|
|
[![Build Status](https://ci-builds.apache.org/job/Lucene/job/Lucene-Artifacts-main/badge/icon?subject=Lucene)](https://ci-builds.apache.org/job/Lucene/job/Lucene-Artifacts-main/)
|
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:
|
|
|
|
|
2021-09-19 20:24:13 -04:00
|
|
|
- Latest Releases: <https://lucene.apache.org/core/documentation.html>
|
|
|
|
- Nightly: <https://ci-builds.apache.org/job/Lucene/job/Lucene-Artifacts-main/javadoc/>
|
|
|
|
- Build System Documentation: [help/](./help/)
|
2017-06-27 18:04:15 -04:00
|
|
|
|
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:
|
|
|
|
|
2021-05-24 03:59:54 -04:00
|
|
|
0. Install OpenJDK 11 (or greater up until version 15)
|
2021-03-24 12:17:53 -04:00
|
|
|
1. Download Lucene from Apache and unpack it (or clone the git repository).
|
|
|
|
2. Run gradle launcher script (`gradlew`).
|
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
|
2021-03-25 19:37:52 -04:00
|
|
|
don't, then we suggest starting at https://jdk.java.net/ and learning
|
2021-03-10 10:10:06 -05:00
|
|
|
more about Java, before returning to this README. Lucene runs with
|
2021-05-24 03:59:54 -04:00
|
|
|
Java 11 or later.
|
2020-01-09 06:36:40 -05:00
|
|
|
|
2021-05-24 03:59:54 -04:00
|
|
|
Lucene uses [Gradle](https://gradle.org/) for build control. Gradle is itself Java-based
|
|
|
|
and may be incompatible with newer Java versions; you can still build and test
|
|
|
|
Lucene with these Java releases, see help/tests.txt for more information.
|
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-24 12:17:53 -04:00
|
|
|
You can clone 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
|
|
|
|
|
2021-03-24 12:17:53 -04:00
|
|
|
or get Lucene source archives for a particular release from:
|
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-24 12:17:53 -04:00
|
|
|
### Step 2) Run Gradle
|
2020-08-28 09:31:16 -04:00
|
|
|
|
2021-03-24 12:17:53 -04:00
|
|
|
Run "./gradlew help", this will show 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
|
2021-03-24 12:17:53 -04:00
|
|
|
tasks (including unit tests).
|
2017-06-27 18:04:15 -04:00
|
|
|
|
2021-03-24 12:17:53 -04:00
|
|
|
`./gradlew help` will print a list of help guides that help understand how
|
|
|
|
the build and typical workflow works.
|
2021-03-10 10:10:06 -05:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2021-03-24 12:17:53 -04:00
|
|
|
- *IntelliJ* - IntelliJ idea can import the project out of the box.
|
2021-03-19 08:08:15 -04:00
|
|
|
- *Eclipse* - Basic support ([help/IDEs.txt](https://github.com/apache/lucene/blob/main/help/IDEs.txt#L7)).
|
2020-01-09 06:36:40 -05:00
|
|
|
- *Netbeans* - Not tested.
|
2017-06-27 18:04:15 -04:00
|
|
|
|
|
|
|
## Contributing
|
|
|
|
|
2021-09-24 15:06:06 -04:00
|
|
|
Bug fixes, improvements and new features are always welcome!
|
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
|