Skip to content

Make Lucene docs to copy real examples - #3107

Open
imotov wants to merge 1 commit into
NVIDIA:mainfrom
imotov:improve-cuvs-lucene-getting-started-docs
Open

imotov wants to merge 1 commit into
NVIDIA:mainfrom
imotov:improve-cuvs-lucene-getting-started-docs

Conversation

@imotov

@imotov imotov commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

and make sure that these examples can actually run.

@imotov imotov added doc Improvements or additions to documentation improvement Improves an existing functionality labels Nov 23, 2026
@imotov imotov added non-breaking Introduces a non-breaking change Lucene labels Nov 23, 2026
@copy-pr-bot

copy-pr-bot Bot commented Nov 23, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@imotov

imotov commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 996a5f5

@imotov imotov removed the improvement Improves an existing functionality label Nov 23, 2026
@imotov imotov self-assigned this Nov 23, 2026
It also simplifies the examples to make them easier to follow.
@imotov
imotov force-pushed the improve-cuvs-lucene-getting-started-docs branch from 996a5f5 to b8a44ca Compare November 24, 2026 00:20
@imotov

imotov commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test b8a44ca

@imotov
imotov marked this pull request as ready for review November 24, 2026 01:07
@imotov
imotov requested review from a team as code owners November 24, 2026 01:07
@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Documentation
    • Updated the Lucene guide to display the Java examples directly and clarify how to build and run them.
    • Added notes that each example creates an index in a system temporary folder and that folders should be deleted between runs.
  • Examples
    • The Java examples now print search-result IDs and scores; one also displays result status.
    • The GPU search example continues to filter results by active status.

The Java Lucene examples now use temporary index directories and print search results. The Lucene guide embeds both example files, and the README documents how to run them.

Changes: Lucene Java examples

Layer / File(s) Summary
Example indexing and search updates
examples/java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/examples/*.java, examples/java/cuvs-lucene/src/main/resources/logging.properties, examples/java/cuvs-lucene/pom.xml
Both examples generate datasets locally, create temporary index directories, and print search results. They remove periodic commits, detailed logging, vector inspection, and directory cleanup. The shared Utils class, logging configuration, and commons-io dependency are removed.
Guide embeds and run instructions
fern/pages/user_guide/lucene.md, examples/java/cuvs-lucene/README.md
The guide embeds both example source files and points to the README for run instructions. The README documents the embedded source ranges, the native-access option, and temporary index folders.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Suggested reviewers: cjnolet, jamxia155, narangvivek10

Merge Risk: Minimal · up to b8a44

This PR simplifies the Lucene Java examples so they create temporary indexes and print search results, and it updates the guide and README to match. No concrete defect was established, so merge risk is minimal. Two residual unknowns are worth checking when the examples are run: whether the GPU example reads its index correctly with the default compound-file setting, and whether the documentation build resolves the embedded source paths.

Security architecture risk: Minimal · up to b8a44

The quickstarts now leave their generated indexes in temporary storage and tell users to delete them. Each run uses a fresh directory and fixed synthetic data, so the change does not affect application indexes or expose customer data through the examples.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed write and output behavior is limited to the invoking process's temporary storage and standard output. The inspected entrypoints do not accept caller-supplied paths, index data, or queries.
Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title says the Lucene docs will copy real examples. The changeset does this: the guide now embeds the Java example source files instead of inline code, and the examples were simplified and made ru…
Description check Passed The description says the examples must be able to run. The changeset supports this: the README run commands change to --enable-native-access=ALL-UNNAMED, the examples are simplified, and the logging a…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title says the Lucene docs will copy real examples. The changeset does this: the guide now embeds the Java example source files instead of inline code, and the examples were simplified and made runnable. The title names the main change, though it does not mention the removed Utils class or logging changes. It also has a minor grammar issue ("to copy" should be "to copy" after "make" without "to"), but the meaning is clear.

Full details: Description check

Explanation

The description says the examples must be able to run. The changeset supports this: the README run commands change to --enable-native-access=ALL-UNNAMED, the examples are simplified, and the logging and temp-directory handling is reworked. The description is brief but related to the changeset.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: NVIDIA/cuvs
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 26d8c73
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 64430d0c-f785-4d6c-b06d-f13f5bef5f7a
Commits

Reviewing files that changed from the base of the PR and between 26d8c73 and b8a44ca.

Files selected for processing: 7

  • examples/java/cuvs-lucene/README.md
  • examples/java/cuvs-lucene/pom.xml
  • examples/java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/examples/AcceleratedHnswExample.java
  • examples/java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/examples/IndexAndSearchonGPUExample.java
  • examples/java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/examples/Utils.java
  • examples/java/cuvs-lucene/src/main/resources/logging.properties
  • fern/pages/user_guide/lucene.md
Files with no reviewable changes: 3

  • examples/java/cuvs-lucene/pom.xml
  • examples/java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/examples/Utils.java
  • examples/java/cuvs-lucene/src/main/resources/logging.properties

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Improvements or additions to documentation Lucene non-breaking Introduces a non-breaking change

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant