Apache Lucene open-source search software
Go to file
zhouhui bf074502df
[Fix] Binary search the BlockTree term entries when all suffixes have the same length in a leaf block. (#11888)
* Binary search the entries when all suffixes have the same length in a leaf block.

* add comment on allEqual.

* BackwardsCompatibility: keep the same logic on fillTerm and SeekStatus(NOT_FOUND, END).

* Update comments: modify scan to binary search.

* Add unit test for binarySearchTermLeaf.

* Format code.

* Assert the value of termsEnum.term() is correct after seeking.

* Add CHANGES entry.

* Clarify "leaf block _of the terms dict_"

* Set suffixesReader's position.

* Advance to the greater term If binary search ended at the less term.

* Assert termsEnum's position after seeking.

* Tidy.

* Advance to the greater term if binary search ended at the less term: nextEnt plus 1.

* Advance to the greater term if binary search ended at the less term and greater term exists.

* Add test case: target greater than the last entry of the matched block.

* Move test case that target greater than the last entry of the matched block to TestLucene90PostingsFormat.

* Move test case for target greater than the last entry of the matched block to TestLucene99PostingsFormat

* Clarify code.

* Replace ternary with verbose if.

* Replace seekExact with seekCeil.

* Replace division by 2 with logical right shift.

* Remove assert ste.termExists.

* Clarify code.

* Remove stale change entry.

* Fix comment.

---------

Co-authored-by: Adrien Grand <jpountz@gmail.com>
2024-04-01 09:14:14 -04:00
.github Make run-nightly-smoketester.yml run on java 21+ only 2024-02-29 13:03:42 +01:00
buildSrc Upgrade forbiddenapis to version 3.7 and ASM for APIJAR extraction to 9.7 2024-03-24 00:09:24 +01:00
dev-docs a bit of clarification about GitHub Milestone 2022-08-28 13:52:58 +09:00
dev-tools Convert IOContext, MergeInfo, and FlushInfo to record classes (#13205) 2024-03-26 12:27:51 +01:00
gradle remove unnecessary chmod+x, file is marked executable in snowball git 2024-03-28 16:43:47 -04:00
help Add regeneration workaround to the docs 2024-03-30 09:52:21 -04:00
lucene [Fix] Binary search the BlockTree term entries when all suffixes have the same length in a leaf block. (#11888) 2024-04-01 09:14:14 -04: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 GITHUB#12655: Add google java format upgrade tidy / regen to blame ignore 2023-10-11 16:15:42 -04: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
.lift.toml Disable liftbot, we have our own tools 2022-05-05 22:27:57 +02:00
CONTRIBUTING.md Update contributing guide: autocrlf and build dependencies (#12963) 2023-12-22 09:28:53 +01:00
LICENSE.txt LUCENE-10163 Move LICENSE and NOTICE file to top level (#388) 2021-10-18 01:24:11 +02:00
NOTICE.txt Cleanup NOTICE.txt (#12227) 2023-04-18 15:58:09 -04:00
README.md Bump minimum required Java version to 21 (#12753) 2024-02-29 12:16:29 +01:00
build.gradle Upgrade forbiddenapis to version 3.7 and ASM for APIJAR extraction to 9.7 2024-03-24 00:09:24 +01:00
gradlew Bump minimum required Java version to 21 (#12753) 2024-02-29 12:16:29 +01:00
gradlew.bat Bump minimum required Java version to 21 (#12753) 2024-02-29 12:16:29 +01:00
settings.gradle Build: build scans on ge.apache.org to benefit from deep build insights (#12293) 2023-10-24 12:32:18 -04:00
versions.lock upgrade to OpenNLP 2.3.2 (#12674) 2024-02-09 11:21:41 +00:00
versions.props upgrade to OpenNLP 2.3.2 (#12674) 2024-02-09 11:21:41 +00: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 21.
  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