Apache Lucene open-source search software
Go to file
Alan Woodward 332679886c
Add field as a separate input to newSynonymQuery (#11941)
QueryBuilder#newSynonymQuery takes an array of TermAndBoost objects as a
parameter and uses the field of the first term in the array as its field. However,
there are cases where this array may be empty, which will result in an
ArrayOutOfBoundsException.

This commit reworks QueryBuilder so that TermAndBoost contains plain
BytesRefs, and passes the field as a separate parameter. This guards against
accidental calls to newSynonymQuery with an empty list - in this case, an
empty synonym query is generated rather than an exception. It also
refactors SynonymQuery itself to hold BytesRefs rather than Terms, which
needlessly repeat the field for each entry.

Fixes #11864
2022-11-21 09:55:14 +00:00
.github Update github actions to v3. (#11931) 2022-11-14 19:50:52 +01:00
buildSrc Add star import check/validation (#11949) 2022-11-18 16:42:59 +01:00
dev-docs a bit of clarification about GitHub Milestone 2022-08-28 13:52:58 +09:00
dev-tools Add self-contained artifact upload script for apache nexus (#11329) (#11947) 2022-11-18 18:58:06 +01:00
gradle Implement source code regeneration for test-framework perl scripts (#11952) 2022-11-19 23:40:45 +01:00
help reland: 11925 javac options (#11937) 2022-11-15 19:28:52 -05:00
lucene Add field as a separate input to newSynonymQuery (#11941) 2022-11-21 09:55:14 +00:00
.asf.yaml .asf.yaml 2022-08-16 20:02:47 +09:00
.dir-locals.el LUCENE-9322: Add Lucene90 codec, including VectorFormat 2020-10-18 07:49:36 -04:00
.git-blame-ignore-revs LUCENE-9570: code reformatting [record rev]. 2021-01-05 13:44:42 +01:00
.gitattributes LUCENE-10305: Ensure line endings of versions.props is LF 2021-12-11 10:10:44 +09:00
.gitignore LUCENE-9920: Remove binary gradle-wrapper.jar from the repository 2021-04-10 16:08:39 +02:00
.hgignore LUCENE-2792: add FST impl 2010-12-12 15:36:08 +00:00
.lift.toml Disable liftbot, we have our own tools 2022-05-05 22:27:57 +02:00
CONTRIBUTING.md Fix type in CONTRIBUTING.md (#11879) 2022-11-01 20:10:05 +00:00
LICENSE.txt LUCENE-10163 Move LICENSE and NOTICE file to top level (#388) 2021-10-18 01:24:11 +02:00
NOTICE.txt LUCENE-10613: Clean up outdated NOTICE.txt information concerning morfologik 2022-06-13 19:50:54 +02:00
README.md Allow building with java 18 now that gradle supports it (#11889) 2022-10-28 23:41:09 -04:00
build.gradle Implement source code regeneration for test-framework perl scripts (#11952) 2022-11-19 23:40:45 +01:00
gradlew Allow building with java 18 now that gradle supports it (#11889) 2022-10-28 23:41:09 -04:00
gradlew.bat Allow building with java 18 now that gradle supports it (#11889) 2022-10-28 23:41:09 -04:00
settings.gradle GH-11172: remove WindowsDirectory and native subproject. (#11774) 2022-09-15 16:22:46 +02:00
versions.lock #11720 Upgrade randomizedtesting to 2.8.1 (#11721) 2022-08-26 00:01:57 +02:00
versions.props Upgrade several build dependencies. (#11812) 2022-09-25 17:10:22 +02:00

README.md

Apache Lucene

Lucene Logo

Apache Lucene is a high-performance, full-featured text search engine library written in Java.

Build Status

Online Documentation

This README file only contains basic setup instructions. For more comprehensive documentation, visit:

Building

Basic steps:

  1. Install OpenJDK 17 or 18.
  2. Clone Lucene's git repository (or download the source distribution).
  3. Run gradle launcher script (gradlew).

We'll assume that you know how to get and set up the JDK - if you don't, then we suggest starting at https://jdk.java.net/ and learning more about Java, before returning to this README.

See Contributing Guide for details.

Contributing

Bug fixes, improvements and new features are always welcome! Please review the Contributing to Lucene Guide for information on contributing.

Discussion and Support