Skip to content

feat: add hierarchy flag to LSM vector index configuration#3130

Merged
lvca merged 4 commits intomainfrom
feat/3127-add-jvector-hierarchy-flag
Jan 14, 2026
Merged

feat: add hierarchy flag to LSM vector index configuration#3130
lvca merged 4 commits intomainfrom
feat/3127-add-jvector-hierarchy-flag

Conversation

@robfrank
Copy link
Collaborator

No description provided.

@robfrank robfrank linked an issue Jan 14, 2026 that may be closed by this pull request
@robfrank robfrank added this to the 26.1.1 milestone Jan 14, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @robfrank, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the LSM vector index by introducing a new addHierarchy configuration option. This flag provides fine-grained control over the underlying Hierarchical Navigable Small World (HNSW) graph structure, enabling users to decide whether to include hierarchical layers. This feature offers flexibility in balancing search performance, index size, and build time, allowing for better optimization based on specific application requirements.

Highlights

  • New Configuration Flag: Introduced an addHierarchy boolean flag to the LSM vector index configuration, allowing control over the creation of hierarchical layers in the HNSW graph.
  • Index Builder and Metadata Integration: The addHierarchy flag has been integrated into LSMVectorIndexMetadata, BucketLSMVectorIndexBuilder, and TypeLSMVectorIndexBuilder to ensure it can be configured during index creation and persisted in metadata.
  • Core Index Logic Update: The LSMVectorIndex now utilizes the addHierarchy flag when constructing the GraphIndexBuilder, directly influencing the HNSW graph structure.
  • Test Coverage: Updated existing tests to include the new addHierarchy configuration, demonstrating its usage both via JSON and programmatic index creation.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@mergify
Copy link
Contributor

mergify bot commented Jan 14, 2026

🧪 CI Insights

Here's what we observed from your CI run for 2dc7bec.

🟢 All jobs passed!

But CI Insights is watching 👀

@robfrank
Copy link
Collaborator Author

@tae898 I've added the flag. It was set to false as default value. What value is better as default one, in your opinion?

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces an addHierarchy flag to the LSM vector index configuration, which controls the creation of hierarchical HNSW graphs. The changes are correctly propagated through the metadata and builder classes, and new tests are included to validate the functionality. My review identified a potential NullPointerException in a new builder method and an inconsistent default value for the new flag across different builder classes. Addressing these points will improve the robustness and predictability of the new feature.

robfrank and others added 2 commits January 14, 2026 05:20
…lder.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…uilder.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
public int graphBuildCacheSize = -1; // -1 = use global default
public int mutationsBeforeRebuild = -1; // -1 = use global default
public boolean storeVectorsInGraph = false; // Phase 2: Store vectors inline in graph file
public boolean addHierarchy = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be false by default? Or this is always the reccommended seting?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was false, I've asked to @tae898 in the previous comment. Mybe true is better? I don't know :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't jvector set this true by defualt?

Setting the addHierarchy parameter to true, build a multi-layer index. This approach has proven more robust in highly challenging scenarios. https://github.com/datastax/jvector

I mean ofc I do wanna try both tho and compare.

@lvca lvca added the enhancement New feature or request label Jan 14, 2026
@codacy-production
Copy link

codacy-production bot commented Jan 14, 2026

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.18% 85.71%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (64e6015) 76651 49983 65.21%
Head commit (2dc7bec) 76666 (+15) 49856 (-127) 65.03% (-0.18%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3130) 126 108 85.71%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@lvca lvca merged commit aa82f86 into main Jan 14, 2026
16 of 19 checks passed
robfrank added a commit that referenced this pull request Feb 11, 2026
* feat: add hierarchy flag to LSM vector index configuration

* Update engine/src/main/java/com/arcadedb/schema/TypeLSMVectorIndexBuilder.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update engine/src/main/java/com/arcadedb/schema/BucketLSMVectorIndexBuilder.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* fix: disable hierarchy flag in vector index metadata

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
(cherry picked from commit aa82f86)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose JVector addHierarchy option in ArcadeDB vector index

3 participants