Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
8e3c3f0
Create LICENSE
cjnolet Jun 5, 2025
8ec0201
Initial commit
cjnolet Jul 2, 2025
39de07f
Create .pre-commit-config.yaml
cjnolet Jul 2, 2025
6020469
Updates
cjnolet Jul 2, 2025
98d5f03
update copyright
benfred Jul 2, 2025
42e5d02
standardize license text
benfred Jul 2, 2025
2b2ae08
Create CONTRIBUTING.md
cjnolet Jul 8, 2025
cdfeca0
Update README.md
cjnolet Jul 16, 2025
c5cf67b
Adding codeowners
cjnolet Jul 25, 2025
d3ff041
feat: add ops-bot config
gforsyth Jul 30, 2025
ad8813f
Add the Spotless Maven plugin (and other initial changes) (NVIDIA/cuv…
narangvivek10 Jul 30, 2025
9ed4a68
Update package names (NVIDIA/cuvs-lucene#9)
narangvivek10 Jul 31, 2025
054fafb
Updates to adapt with cuVS-Java API changes (NVIDIA/cuvs-lucene#10)
narangvivek10 Aug 2, 2025
2bbd0e3
Merge pull request NVIDIA/cuvs-lucene#12 from dantegd/fea-add-ci
dantegd Aug 11, 2025
906cca6
Enable CI (NVIDIA/cuvs-lucene#15)
dantegd Aug 26, 2025
9e23cba
simplify build scripts (NVIDIA/cuvs-lucene#19)
jameslamb Aug 27, 2025
1509652
Build and test with CUDA 13.0 (NVIDIA/cuvs-lucene#20)
jameslamb Sep 2, 2025
d8af7fe
Use branch-25.10 again (NVIDIA/cuvs-lucene#21)
jameslamb Sep 5, 2025
68f04dc
Configure repo for automatic release notes generation (NVIDIA/cuvs-lu…
AyodeAwe Sep 22, 2025
22c71b2
Fix Tests/CI, refactor merge to call CAGRA's merge(), implement CAGRA…
chatman Sep 24, 2025
19aadc1
CAGRA to HNSW serialization and search on CPU (NVIDIA/cuvs-lucene#16)
narangvivek10 Sep 26, 2025
1bed6b2
Remove hnswlib index (NVIDIA/cuvs-lucene#24)
narangvivek10 Oct 1, 2025
d52d250
Update pom.xml - Add meta information, configure Maven Surefire Plugi…
narangvivek10 Oct 2, 2025
29f8dfd
Removing 10.2 codecs to avoid backward compatibility issues during Lu…
narangvivek10 Oct 3, 2025
d642fec
Avoid copying vectors to heap before creating dataset matrix (NVIDIA/…
chatman Oct 9, 2025
f4bd682
Upgrade to cuvs-java maven central artifacts, single-vector bugfix (N…
chatman Oct 17, 2025
e3c53e3
Use main branch (NVIDIA/cuvs-lucene#32)
rockhowse Oct 21, 2025
d0649a7
Use main shared-workflows branch (NVIDIA/cuvs-lucene#33)
rockhowse Oct 21, 2025
2e28888
Add Javadocs and configure the Apache Maven Javadoc Plugin (NVIDIA/cu…
narangvivek10 Oct 24, 2025
f15d934
Fix cuvs-lucene Github artifact publication (NVIDIA/cuvs-lucene#34)
mythrocks Oct 31, 2025
2e5dc2b
Add support to build the sources jar. (NVIDIA/cuvs-lucene#44)
mythrocks Nov 13, 2025
b00e7d0
Use SPDX for all copyright headers (NVIDIA/cuvs-lucene#47)
narangvivek10 Nov 17, 2025
2f8977c
updated update-version.sh to handle release branch version changes (N…
rockhowse Nov 18, 2025
9a88a3b
Merge pull request NVIDIA/cuvs-lucene#51 from rapidsai/version-update…
AyodeAwe Nov 18, 2025
339f564
Update for release branch release/25.12
AyodeAwe Nov 18, 2025
ac8f525
Modify CI pipeline to use latest cuvs-java instead of the one release…
narangvivek10 Nov 25, 2025
c1837ba
Use strict priority in CI conda tests (NVIDIA/cuvs-lucene#53)
bdice Nov 25, 2025
0025e3d
Setup Java Code Coverage and add more tests (NVIDIA/cuvs-lucene#42)
narangvivek10 Nov 25, 2025
65a8b65
Lucene version agnostic vector format implementation (NVIDIA/cuvs-luc…
narangvivek10 Nov 25, 2025
fceaf1a
Modify CI pipeline to use latest cuvs-java instead of the one release…
narangvivek10 Nov 25, 2025
de0b8e4
Use strict priority in CI conda tests (NVIDIA/cuvs-lucene#53)
bdice Nov 25, 2025
ba1ed61
Setup Java Code Coverage and add more tests (NVIDIA/cuvs-lucene#42)
narangvivek10 Nov 25, 2025
4446492
Lucene version agnostic vector format implementation (NVIDIA/cuvs-luc…
narangvivek10 Nov 25, 2025
38d4355
Make RAPIDS_BRANCH have release/25.12
narangvivek10 Nov 26, 2025
ef5c64c
Use strict priority in CI conda tests (NVIDIA/cuvs-lucene#60)
bdice Dec 2, 2025
3cb76cf
Merge pull request NVIDIA/cuvs-lucene#56 from SearchScale/vivek/bring…
gforsyth Dec 4, 2025
54f89cd
Updates to the logging setup and adapt with latest cuvs-java changes …
narangvivek10 Dec 4, 2025
fae2db0
Merge release/25.12 into main
narangvivek10 Dec 5, 2025
1453189
Enable merge barriers (NVIDIA/cuvs-lucene#68)
KyleFromNVIDIA Dec 9, 2025
ca71f92
Merge branch 'main' into main-merge-release/25.12
narangvivek10 Dec 10, 2025
d4a3a83
Merge pull request NVIDIA/cuvs-lucene#66 from SearchScale/main-merge-…
rapids-bot[bot] Dec 10, 2025
43b4986
Fix for issue - pipeline marked successful even when the build failed…
narangvivek10 Jan 5, 2026
432400f
Update spotless config - remove license header enforcement (NVIDIA/cu…
narangvivek10 Jan 5, 2026
46ce1d5
Fix groupId in build.sh and remove warnings (NVIDIA/cuvs-lucene#69)
narangvivek10 Jan 5, 2026
2e191ff
Setup examples (NVIDIA/cuvs-lucene#72)
narangvivek10 Jan 6, 2026
43225c7
Refactor GPUPerLeafCuVSKnnCollector, plug in iTopK and search width v…
narangvivek10 Jan 6, 2026
2413df0
Setup JMH (NVIDIA/cuvs-lucene#71)
narangvivek10 Jan 6, 2026
9a6567b
Cleanup FilterCuVSProvider (NVIDIA/cuvs-lucene#77)
narangvivek10 Jan 6, 2026
fb17889
Fix spotless plugin configuration for examples (NVIDIA/cuvs-lucene#88)
narangvivek10 Jan 6, 2026
8bb8171
build and test against CUDA 13.1.0 (NVIDIA/cuvs-lucene#89)
jameslamb Jan 8, 2026
4b3adc8
Fix for result returned was not in topk (NVIDIA/cuvs-lucene#94)
narangvivek10 Jan 12, 2026
238f925
Setup ThreadLocal based CuVSResources usage (NVIDIA/cuvs-lucene#87)
narangvivek10 Jan 13, 2026
2546fc2
Use main shared-workflows branch (NVIDIA/cuvs-lucene#96)
jameslamb Jan 14, 2026
9b87665
Revert "Prepare release/26.02"
AyodeAwe Jan 16, 2026
7a0f494
Prepare release/26.02
AyodeAwe Jan 16, 2026
2131359
Update to 26.04 (NVIDIA/cuvs-lucene#98)
AyodeAwe Jan 16, 2026
db06f9d
Add quantization vector formats, writers, and codecs (NVIDIA/cuvs-luc…
punAhuja Jan 22, 2026
af0c6ff
Merge pull request NVIDIA/cuvs-lucene#100 from rapidsai/release/26.02
GPUtester Jan 22, 2026
4222db2
fix(build): build package on merge to `release/*` branch (NVIDIA/cuvs…
gforsyth Jan 26, 2026
17eebcb
Merge pull request NVIDIA/cuvs-lucene#102 from rapidsai/release/26.02
GPUtester Jan 26, 2026
3d3043b
Make CAGRA graph build algo configurable (NVIDIA/cuvs-lucene#73)
narangvivek10 Jan 28, 2026
bef3a47
Merge pull request NVIDIA/cuvs-lucene#107 from rapidsai/release/26.02
GPUtester Jan 28, 2026
5f97c26
Revise README with build and test details (NVIDIA/cuvs-lucene#108)
cjnolet Jan 28, 2026
3bb8782
Update readme (NVIDIA/cuvs-lucene#111)
narangvivek10 Jan 28, 2026
9388dfd
Merge pull request NVIDIA/cuvs-lucene#112 from rapidsai/release/26.02
GPUtester Jan 28, 2026
cb4fe5a
Add a multi-threaded test for searching on the GPU (NVIDIA/cuvs-lucen…
narangvivek10 Jan 29, 2026
04cef69
Merge pull request NVIDIA/cuvs-lucene#113 from rapidsai/release/26.02
GPUtester Jan 29, 2026
7a2bd19
use CUDA 13.1.1, update pre-commit hooks (NVIDIA/cuvs-lucene#116)
jameslamb Feb 3, 2026
3d65177
Setup parameter validation and encapsulate parameters (NVIDIA/cuvs-lu…
narangvivek10 Feb 3, 2026
a1753c1
check-nightly-ci: update to new version (NVIDIA/cuvs-lucene#119)
jameslamb Feb 20, 2026
53fb7e9
Make CAGRA build algo configurable for the AcceleratedHNSW (NVIDIA/cu…
narangvivek10 Mar 5, 2026
79c041c
Revert "Prepare release/26.04"
AyodeAwe Mar 12, 2026
86d8e84
Prepare release/26.04
AyodeAwe Mar 12, 2026
d3700d8
Update to 26.06 (NVIDIA/cuvs-lucene#123)
AyodeAwe Mar 12, 2026
cf6d755
Code improvements - Index and search on the GPU API (NVIDIA/cuvs-luce…
narangvivek10 Apr 1, 2026
a3ad02e
Code improvements - AcceleratedHNSW API (NVIDIA/cuvs-lucene#115)
narangvivek10 Apr 2, 2026
77cdc53
Merge release/26.04 into main
AyodeAwe Apr 6, 2026
b3784f5
Resolve forward-merge release/26.04 into main (NVIDIA/cuvs-lucene#130)
AyodeAwe Apr 6, 2026
d18d9c7
Introduce a heuristic approach to CAGRA build algorithm selection and…
narangvivek10 May 4, 2026
8426eda
Build and test with CUDA 13.2.0 (NVIDIA/cuvs-lucene#144)
bdice May 12, 2026
982f445
fix(ci): resolve all zizmor findings and add zizmor pre-commit checks…
gforsyth May 14, 2026
5971bfe
Prepare release/26.06
jolorunyomi May 15, 2026
05e9a4c
Revert "Prepare release/26.06"
jolorunyomi May 15, 2026
dd3f051
Update to 26.08.00
jolorunyomi May 15, 2026
342e62e
Merge pull request NVIDIA/cuvs-lucene#148 from rapidsai/version-updat…
jolorunyomi May 15, 2026
39910bf
Add SECURITY.md (NVIDIA/cuvs-lucene#154)
jameslamb May 29, 2026
3b5a084
use GCS mirror for Maven, fix benchmarks version, other small changes…
jameslamb Jun 26, 2026
8ffc410
Build and test with CUDA 13.3.0 (NVIDIA/cuvs-lucene#164)
bdice Jun 26, 2026
ff0878c
Update CODEOWNERS team names for rapidsai->NVIDIA migration
josephine-wolf-oberholtzer Jun 26, 2026
535aaf8
Add verify-codeowners pre-commit check
josephine-wolf-oberholtzer Jun 26, 2026
dca9597
Disable verify-codeowners check
josephine-wolf-oberholtzer Jun 26, 2026
534a962
Merge pull request NVIDIA/cuvs-lucene#169 from josephine-wolf-oberhol…
josephine-wolf-oberholtzer Jun 26, 2026
2b95f5a
cuvs-lucene-137: increase max-number of HNSW layers in CAGRA_HNSW's c…
nvzm123 Jul 15, 2026
69bb9da
Prepare release/26.08
jolorunyomi Jul 16, 2026
b7048c4
Revert "Prepare release/26.08"
jolorunyomi Jul 16, 2026
abc5517
Update to 26.10.00
jolorunyomi Jul 16, 2026
a0108af
Merge pull request NVIDIA/cuvs-lucene#176 from NVIDIA/version-update-…
jolorunyomi Jul 16, 2026
93ccb67
Upgrade cuda 12.9.1 -> 12.9.2 (NVIDIA/cuvs-lucene#179)
imotov Jul 21, 2026
4680121
Merge main branch of 'cuvs-lucene' into cuvs
imotov Jul 22, 2026
9d57c52
Delete unnecessary cuvs-lucene files
imotov Jul 21, 2026
4cbf345
Update build.sh scripts
imotov Jul 22, 2026
879b6c2
Update CODEOWNERS and update-version.sh
imotov Jul 22, 2026
e3595cc
Fix .gitignore
imotov Jul 22, 2026
9be9cdc
First stab at CI scripts
imotov Jul 22, 2026
0cb2cc6
Update README.md files
imotov Jul 22, 2026
4b41d07
Comment out cuvs-lucene-write for now
imotov Jul 22, 2026
150b1de
Fix copyright headers in cuvs-lucene folder
imotov Jul 22, 2026
39aa307
Fix codespell errors
imotov Jul 22, 2026
3025018
Temp: tesing build consistency
imotov Jul 24, 2026
085107c
Temp: tesing build consistency second attempt
imotov Jul 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ examples/cpp/ @NVIDIA/cuvs-cpp-codeowners
java/ @NVIDIA/cuvs-java-codeowners
examples/java/ @NVIDIA/cuvs-java-codeowners

#cuvs lucene code owners
# TODO: should we have this?
#java/cuvs-lucene @NVIDIA/cuvs-lucene-write

#python code owners
python/ @NVIDIA/cuvs-python-codeowners

Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,39 @@ jobs:
artifact-name: "cuvs-java-cuda${{ matrix.CUDA_VER }}"
file_to_upload: "java/cuvs-java/target/"
sha: ${{ inputs.sha }}
lucene-build-matrix:
needs: cpp-build
permissions:
contents: read
uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main
with:
build_type: pull-request
matrix_name: conda-cpp-build
matrix_filter: map(select(.ARCH == "amd64"))
lucene-build:
# Consumes the cuvs-java artifact uploaded by java-build instead of rebuilding cuvs-java.
needs: [lucene-build-matrix, java-build]
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
secrets: inherit # zizmor: ignore[secrets-inherit]
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.lucene-build-matrix.outputs.matrix) }}
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
arch: "amd64"
date: ${{ inputs.date }}
container_image: "rapidsai/ci-conda:26.10-cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PY_VER }}"
script: "ci/build_lucene.sh"
artifact-name: "cuvs-lucene-cuda${{ matrix.CUDA_VER }}"
file_to_upload: "java/cuvs-lucene/target/"
sha: ${{ inputs.sha }}
python-build:
needs: [cpp-build]
permissions:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
- rocky8-clib-tests
- conda-java-build-and-tests-matrix
- conda-java-build-and-tests
- conda-lucene-build-and-tests-matrix
- conda-lucene-build-and-tests
- rust-build-matrix
- rust-build
- go-build-matrix
Expand Down Expand Up @@ -548,6 +550,40 @@ jobs:
script: "ci/test_java.sh"
artifact-name: "cuvs-java-cuda${{ matrix.CUDA_VER }}"
file_to_upload: "java/cuvs-java/target/"
conda-lucene-build-and-tests-matrix:
needs: [conda-cpp-build, changed-files]
permissions:
contents: read
uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main
# cuvs-lucene lives under java/, so java/cuvs-lucene changes trigger the test_java group.
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_java || fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp
with:
build_type: pull-request
matrix_name: conda-cpp-build
matrix_filter: map(select(.ARCH == "amd64"))
conda-lucene-build-and-tests:
# Depends on conda-java-build-and-tests to consume its uploaded cuvs-java artifact
# (installed into the local Maven repo) instead of rebuilding cuvs-java.
needs: [conda-java-build-and-tests, conda-lucene-build-and-tests-matrix]
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
secrets: inherit # zizmor: ignore[secrets-inherit]
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.conda-lucene-build-and-tests-matrix.outputs.matrix) }}
with:
build_type: pull-request
node_type: "gpu-l4-latest-1"
arch: "amd64"
container_image: "rapidsai/ci-conda:26.10-cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PY_VER }}"
script: "ci/test_lucene.sh"
artifact-name: "cuvs-lucene-cuda${{ matrix.CUDA_VER }}"
file_to_upload: "java/cuvs-lucene/target/"
rust-build-matrix:
needs: [conda-cpp-build, changed-files]
permissions:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,40 @@ jobs:
script: "ci/test_java.sh"
artifact-name: "cuvs-java-cuda${{ matrix.CUDA_VER }}"
file_to_upload: "java/cuvs-java/target/"
conda-lucene-build-and-tests-matrix:
permissions:
contents: read
uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main
with:
build_type: ${{ inputs.build_type }}
matrix_name: conda-cpp-build
matrix_filter: map(select(.ARCH == "amd64"))
conda-lucene-build-and-tests:
# Consumes the cuvs-java artifact uploaded by conda-java-build-and-tests instead of
# rebuilding cuvs-java.
needs: [conda-java-build-and-tests, conda-lucene-build-and-tests-matrix]
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
secrets: inherit # zizmor: ignore[secrets-inherit]
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.conda-lucene-build-and-tests-matrix.outputs.matrix) }}
with:
build_type: ${{ inputs.build_type }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
node_type: "gpu-l4-latest-1"
arch: "amd64"
container_image: "rapidsai/ci-conda:26.10-cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PY_VER }}"
script: "ci/test_lucene.sh"
artifact-name: "cuvs-lucene-cuda${{ matrix.CUDA_VER }}"
file_to_upload: "java/cuvs-lucene/target/"
wheel-tests-cuvs:
permissions:
actions: read
Expand Down
19 changes: 17 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ARGS=$*
# scripts, and that this script resides in the repo dir!
REPODIR=$(cd "$(dirname "$0")"; pwd)

VALIDARGS="clean libcuvs python rust go java docs tests bench-ann examples --uninstall -v -g -n --allgpuarch --no-mg --mnmg-tests --no-cpu --cpu-only --no-shared-libs --no-nvtx --show_depr_warn --incl-cache-stats --time -h --run-java-tests"
VALIDARGS="clean libcuvs python rust go java lucene docs tests bench-ann examples --uninstall -v -g -n --allgpuarch --no-mg --mnmg-tests --no-cpu --cpu-only --no-shared-libs --no-nvtx --show_depr_warn --incl-cache-stats --time -h --run-java-tests"
HELP="$0 [<target> ...] [<flag> ...] [--cmake-args=\"<args>\"] [--cache-tool=<tool>] [--limit-tests=<targets>] [--limit-bench-ann=<targets>] [--build-metrics=<filename>]
where <target> is:
clean - remove all existing build artifacts and configuration (start over)
Expand All @@ -29,6 +29,7 @@ HELP="$0 [<target> ...] [<flag> ...] [--cmake-args=\"<args>\"] [--cache-tool=<to
rust - build the cuvs Rust bindings
go - build the cuvs Go bindings
java - build the cuvs Java bindings
lucene - build the cuVS Lucene library
docs - build the documentation
tests - build the tests
bench-ann - build end-to-end ann benchmarks
Expand Down Expand Up @@ -74,7 +75,8 @@ FERN_DOCS_DIR=${REPODIR}/fern
PYTHON_BUILD_DIR=${REPODIR}/python/cuvs/_skbuild
RUST_BUILD_DIR=${REPODIR}/rust/target
JAVA_BUILD_DIR=${REPODIR}/java/cuvs-java/target
BUILD_DIRS="${LIBCUVS_BUILD_DIR} ${PYTHON_BUILD_DIR} ${RUST_BUILD_DIR} ${JAVA_BUILD_DIR}"
LUCENE_BUILD_DIR=${REPODIR}/java/cuvs-lucene/target
BUILD_DIRS="${LIBCUVS_BUILD_DIR} ${PYTHON_BUILD_DIR} ${RUST_BUILD_DIR} ${JAVA_BUILD_DIR} ${LUCENE_BUILD_DIR}"

# Set defaults for vars modified by flags to this script
CMAKE_LOG_LEVEL=""
Expand Down Expand Up @@ -555,6 +557,19 @@ if (( NUMARGS == 0 )) || hasArg java; then
fi
fi

# Build the cuVS Lucene library
if (( NUMARGS == 0 )) || hasArg lucene; then
if ! hasArg java; then
echo "Note: 'lucene' builds against the already-installed cuvs-java artifact. Add 'java' (ex. './build.sh java lucene') if cuvs-java has changed and needs rebuilding."
fi
cd "${REPODIR}"/java/cuvs-lucene
if hasArg --run-java-tests; then
./build.sh --run-java-tests
else
./build.sh
fi
fi

RAPIDS_VERSION="$(sed -E -e 's/^([0-9]{2})\.([0-9]{2})\.([0-9]{2}).*$/\1.\2.\3/' "${REPODIR}/VERSION")"
export RAPIDS_VERSION
RAPIDS_VERSION_MAJOR_MINOR="$(sed -E -e 's/^([0-9]{2})\.([0-9]{2})\.([0-9]{2}).*$/\1.\2/' "${REPODIR}/VERSION")"
Expand Down
10 changes: 10 additions & 0 deletions c/include/cuvs/core/c_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,16 @@ CUVS_EXPORT cuvsError_t cuvsRMMHostFree(void* ptr, size_t bytes);
*/
CUVS_EXPORT cuvsError_t cuvsVersionGet(uint16_t* major, uint16_t* minor, uint16_t* patch);

/**
* @brief Bogus function used to verify end-to-end build propagation from the cuVS C
* layer, through the cuvs-java bindings, to cuvs-lucene. Returns the sum of its
* two arguments.
* @param[in] a First addend
* @param[in] b Second addend
* @return The sum @p a + @p b
*/
CUVS_EXPORT int cuvsBogusAddV1(int a, int b);

/**
* @brief Copy a matrix
*
Expand Down
2 changes: 2 additions & 0 deletions c/src/core/c_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ extern "C" cuvsError_t cuvsVersionGet(uint16_t* major, uint16_t* minor, uint16_t
return CUVS_SUCCESS;
}

extern "C" int cuvsBogusAddV1(int a, int b) { return a + b; }

namespace {
template <typename T>
void _copy_matrix(cuvsResources_t res, DLManagedTensor* src_managed, DLManagedTensor* dst_managed)
Expand Down
76 changes: 76 additions & 0 deletions ci/build_lucene.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

set -euo pipefail

# TODO: Remove this argument-handling when build and test workflows are separated,
# and test_lucene.sh no longer calls build_lucene.sh
# ref: https://github.com/rapidsai/cuvs/issues/868
EXTRA_BUILD_ARGS=()
if [[ "${1:-}" == "--run-java-tests" ]]; then
EXTRA_BUILD_ARGS+=("--run-java-tests")
fi

if [ -e "/opt/conda/etc/profile.d/conda.sh" ]; then
. /opt/conda/etc/profile.d/conda.sh
fi

rapids-logger "Configuring conda strict channel priority"
conda config --set channel_priority strict

rapids-logger "Downloading artifacts from previous jobs"
# libcuvs C++ conda package (provides libcuvs.so / libcuvs_c.so used at test time)
CPP_CHANNEL=$(rapids-download-from-github "$(rapids-artifact-name conda_cpp libcuvs cuvs --cuda "$RAPIDS_CUDA_VERSION")")
# cuvs-java jar built by the java-build job (avoids rebuilding cuvs-java here)
CUVS_JAVA_ARTIFACT_DIR=$(rapids-download-from-github "cuvs-java-cuda${RAPIDS_CUDA_VERSION}")

rapids-logger "Generate Java testing dependencies"

ENV_YAML_DIR="$(mktemp -d)"

rapids-dependency-file-generator \
--output conda \
--file-key java \
--prepend-channel "${CPP_CHANNEL}" \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch)" | tee "${ENV_YAML_DIR}/env.yaml"

rapids-mamba-retry env create --yes -f "${ENV_YAML_DIR}/env.yaml" -n java

# Temporarily allow unbound variables for conda activation.
set +u
conda activate java
set -u

rapids-print-env

# cuvs-lucene depends on the plain cuvs-java jar (no bundled native libraries), so it loads
# libcuvs through the system loader. Make the conda-provided libcuvs discoverable at test time.
export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH:-}"

# Install the cuvs-java artifact built by the java-build job into the local Maven repository
# so that cuvs-lucene resolves com.nvidia.cuvs:cuvs-java without rebuilding it. The GAV is
# taken from the artifact's own pom.xml (bundled alongside the jar by java/build.sh).
VERSION=$(grep -oP 'VERSION="\K[^"]+' java/build.sh)
CUVS_JAVA_JAR=$(find "${CUVS_JAVA_ARTIFACT_DIR}" -name "cuvs-java-${VERSION}.jar" | head -1)
CUVS_JAVA_POM=$(find "${CUVS_JAVA_ARTIFACT_DIR}" -name "pom.xml" | head -1)
if [[ -z "${CUVS_JAVA_JAR}" || -z "${CUVS_JAVA_POM}" ]]; then
echo "Error: could not locate cuvs-java-${VERSION}.jar and/or pom.xml in ${CUVS_JAVA_ARTIFACT_DIR}"
exit 1
fi
rapids-logger "Installing cuvs-java ${VERSION} from ${CUVS_JAVA_JAR}"
mvn install:install-file -Dfile="${CUVS_JAVA_JAR}" -DpomFile="${CUVS_JAVA_POM}"

EXITCODE=0
trap "EXITCODE=1" ERR
set +e

rapids-logger "Run cuVS Lucene build"

RAPIDS_CUDA_MAJOR="${RAPIDS_CUDA_VERSION%%.*}"
export RAPIDS_CUDA_MAJOR

bash ./build.sh lucene "${EXTRA_BUILD_ARGS[@]}"

rapids-logger "Build script exiting with value: $EXITCODE"
exit ${EXITCODE}
10 changes: 9 additions & 1 deletion ci/release/update-version.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION.
# SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
########################
# CUVS Version Updater #
Expand Down Expand Up @@ -175,3 +175,11 @@ done
sed_runner "s| CuVS [[:digit:]]\{2\}\.[[:digit:]]\{2\} | CuVS ${NEXT_SHORT_TAG} |g" java/README.md
sed_runner "s|-[[:digit:]]\{2\}\.[[:digit:]]\{2\}\.[[:digit:]]\{1,2\}\.jar|-${NEXT_FULL_JAVA_TAG}\.jar|g" java/examples/README.md
sed_runner "s|/[[:digit:]]\{2\}\.[[:digit:]]\{2\}\.[[:digit:]]\{1,2\}/|/${NEXT_FULL_JAVA_TAG}/|g" java/examples/README.md

# Update cuvs-lucene (integrated Java subproject; uses its own CUVS_LUCENE# markers)
sed_runner "s/VERSION=\".*\"/VERSION=\"${NEXT_FULL_JAVA_TAG}\"/g" java/cuvs-lucene/build.sh
for FILE in java/cuvs-lucene/pom.xml java/cuvs-lucene/examples/pom.xml java/cuvs-lucene/bench/pom.xml; do
sed_runner "/<!--CUVS_LUCENE#VERSION_UPDATE_MARKER_START-->.*<!--CUVS_LUCENE#VERSION_UPDATE_MARKER_END-->/s//<!--CUVS_LUCENE#VERSION_UPDATE_MARKER_START--><version>${NEXT_FULL_JAVA_TAG}<\/version><!--CUVS_LUCENE#VERSION_UPDATE_MARKER_END-->/g" "${FILE}"
done
sed_runner "s|rapidsai/ci-conda:[\.0-9]*-cuda|rapidsai/ci-conda:${NEXT_SHORT_TAG}-cuda|g" java/cuvs-lucene/examples/README.md
sed_runner "s|target/examples-[\.0-9]*-jar|target/examples-${NEXT_FULL_JAVA_TAG}-jar|g" java/cuvs-lucene/examples/README.md
24 changes: 24 additions & 0 deletions ci/test_lucene.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

set -euo pipefail

EXITCODE=0
trap "EXITCODE=1" ERR
set +e

rapids-logger "Check GPU usage"
nvidia-smi

rapids-logger "Run cuVS Lucene build and tests"

RAPIDS_CUDA_MAJOR="${RAPIDS_CUDA_VERSION%%.*}"
export RAPIDS_CUDA_MAJOR

# TODO: switch to installing pre-built artifacts instead of rebuilding in test jobs
# ref: https://github.com/rapidsai/cuvs/issues/868
ci/build_lucene.sh --run-java-tests

rapids-logger "Test script exiting with value: $EXITCODE"
exit ${EXITCODE}
2 changes: 2 additions & 0 deletions java/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ openjdk-22-jextract*
/cuvs-java/bin/
/cuvs-java/src/main/java22/com/nvidia/cuvs/internal/panama/
/cuvs-java/*.cag
# cuvs-lucene
/cuvs-lucene/bin/
10 changes: 10 additions & 0 deletions java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,13 @@ times, by passing `-Dtests.iters=10` through the command line.
## Examples

A few starter examples of CAGRA, HNSW, and Bruteforce indexing and searching are provided in the `examples` directory.

## cuVS Lucene

The [`cuvs-lucene`](cuvs-lucene) directory contains the cuVS integration for
[Apache Lucene](https://github.com/apache/lucene) — a pluggable `KnnVectorsFormat` that enables
GPU-accelerated vector search. It depends on the `cuvs-java` bindings described above.

`lucene` is a separate top-level build target: build it with `./build.sh lucene` (or
`./build.sh java lucene` to rebuild `cuvs-java` first, or `./build.sh libcuvs java lucene` to build
everything from scratch). See [`cuvs-lucene/README.md`](cuvs-lucene/README.md) for details.
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,18 @@ default CagraIndex mergeCagraIndexes(CagraIndex[] indexes, CagraIndexParams merg
/** Disables pooled memory on the current device, reverting back to the default setting. */
void resetRMMPooledMemory();

/**
* Bogus method used to verify end-to-end build propagation from the cuVS C layer, through the
* cuvs-java bindings, to cuvs-lucene. Returns the sum of its two arguments.
*
* @param a first addend
* @param b second addend
* @return the sum {@code a + b}
*/
default int bogusAddV1(int a, int b) {
throw new UnsupportedOperationException("bogusAddV1 is not supported by this provider");
}

/** Retrieves the system-wide provider. */
static CuVSProvider provider() {
return CuVSServiceProvider.Holder.INSTANCE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,11 @@ public void resetRMMPooledMemory() {
checkCuVSError(cuvsRMMMemoryResourceResetInvoker.apply(), "cuvsRMMMemoryResourceReset");
}

@Override
public int bogusAddV1(int a, int b) {
return cuvsBogusAddV1(a, b);
}

@Override
public CuVSMatrix.Builder<CuVSHostMatrix> newHostMatrixBuilder(
long size, long columns, CuVSMatrix.DataType dataType) {
Expand Down
6 changes: 6 additions & 0 deletions java/cuvs-lucene/.mvn/maven.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-e
-B
-Daether.connector.basic.downstreamThreads=1
-Daether.transport.http.retryHandler.count=5
-Daether.transport.http.retryHandler.interval=10000
-Dmaven.wagon.http.retryHandler.count=5
Loading
Loading