mirror of https://github.com/apache/lucene.git
dc6a7f9468
* LUCENE-9848 Sort HNSW graph neighbors for construction Sort HNSW graph neighbors when applying diversity criterion During HNSW graph construction, when a node has already a number of connections larger than maximum allowed (maxConn), we need to prune its connections using a diversity criteria to limit the number of connections to maxConn. Currently when we add reverse connections to already existing nodes, we don't keep them sorted. Thus later, when we apply diversity criteria we may prune not the worst most distant non-diverse nodes. This patch makes sure that neighbours connections are always sorted from best (closest) to worst (distant), and during the application of diversity criteria processes nodes from worst to best. This path does the following: - enhance NeighborArray to always keep neighbour nodes sorted according to their scores (in desc or asc order). Make NeighborArray aware in which order the nodes should be sorted. - make OnHeapHnswGraph aware of the order of similarity function - make HnswGraphBuilder apply diversity criteria from worst to best nodes - create Lucene90NeighborArray to keep the previous logic of NeighborArray for Lucene90Codec |
||
---|---|---|
.github | ||
.muse | ||
buildSrc | ||
dev-docs | ||
dev-tools | ||
gradle | ||
help | ||
lucene | ||
.asf.yaml | ||
.dir-locals.el | ||
.git-blame-ignore-revs | ||
.gitattributes | ||
.gitignore | ||
.hgignore | ||
CONTRIBUTING.md | ||
LICENSE.txt | ||
NOTICE.txt | ||
README.md | ||
build.gradle | ||
gradlew | ||
gradlew.bat | ||
settings.gradle | ||
versions.lock | ||
versions.props |
README.md
Apache Lucene
Apache Lucene is a high-performance, full-featured text search engine library written in Java.
Online Documentation
This README file only contains basic setup instructions. For more comprehensive documentation, visit:
- 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/
- Developer Documentation: dev-docs/
- Migration Guide: lucene/MIGRATE.md
Building
Basic steps:
- Install OpenJDK 17 (exactly this version).
- Clone Lucene's git repository (or download the source distribution).
- 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
- Users Mailing List
- Developers Mailing List
- Issue Tracker
- IRC:
#lucene
and#lucene-dev
on freenode.net