Make LSMVectorIndex ID property configurable#2818
Merged
lvca merged 5 commits intojvector-integrationfrom Nov 22, 2025
Merged
Conversation
2 tasks
Co-authored-by: lvca <[email protected]>
Co-authored-by: lvca <[email protected]>
Co-authored-by: lvca <[email protected]>
Contributor
Author
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot
AI
changed the title
[WIP] Make JVector integration configurable per feedback from review
Make LSMVectorIndex ID property configurable
Nov 21, 2025
Contributor
🧪 CI InsightsHere's what we observed from your CI run for e272dec. 🟢 All jobs passed!But CI Insights is watching 👀 |
robfrank
pushed a commit
that referenced
this pull request
Nov 22, 2025
* Initial plan * Make ID property configurable in LSMVectorIndex Co-authored-by: lvca <[email protected]> * Remove test database files and add to .gitignore Co-authored-by: lvca <[email protected]> * Improve documentation for metadata JSON configuration Co-authored-by: lvca <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: lvca <[email protected]> Co-authored-by: Luca Garulli <[email protected]>
lvca
added a commit
that referenced
this pull request
Nov 22, 2025
* First version with jvector * Implemented compaction of vector indexes * Added test cases * Fixed compilation problems * Fixed test cases, now all pass * Refactor vector index using the transaction index changes instead of internal map (with threadId) * feat: integrated new vector index with the `database import` command * Supported lsmvector in `vectorNeighbors()` sql function * Upgraded to jvector 4.0.0-rc.6 * Update LSMVectorIndexCompacted.java fix: error after compaction * Fix ComparableVector Comparable contract violation (#2817) * Initial plan * Fix ComparableVector to maintain Comparable contract Co-authored-by: lvca <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: lvca <[email protected]> * Apply suggestion from @Copilot Co-authored-by: Copilot <[email protected]> * Return similarity scores from LSMVectorIndex to avoid redundant distance recalculation (#2820) * Initial plan * Add findNeighborsFromVector method to LSMVectorIndex to return scores directly Co-authored-by: lvca <[email protected]> * Remove test artifacts and update .gitignore Co-authored-by: lvca <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: lvca <[email protected]> * Add mutable flag to vector index pages for safe compaction (#2819) * Initial plan * Add mutable byte indicator to vector index pages - Added mutable flag byte at offset 8 in page header (after offsetFreeContent and numberOfEntries) - New pages are created with mutable=1 (actively being written to) - Pages are marked as immutable (mutable=0) when they become full and a new page is created - Updated findLastImmutablePage() to scan from end backwards and stop at first immutable page - Updated all page reading/writing code to account for the mutable byte in header - All vector index tests passing Co-authored-by: lvca <[email protected]> * Remove test database files and update .gitignore Co-authored-by: lvca <[email protected]> * Add constants for page header offsets to improve maintainability - Added OFFSET_FREE_CONTENT, OFFSET_NUM_ENTRIES, OFFSET_MUTABLE, and HEADER_BASE_SIZE constants - Replaced magic numbers throughout the code with named constants - Makes the code more maintainable and self-documenting Co-authored-by: lvca <[email protected]> * Update comments to reference constants instead of hardcoded offsets Co-authored-by: lvca <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: lvca <[email protected]> Co-authored-by: Luca Garulli <[email protected]> * Make LSMVectorIndex ID property configurable (#2818) * Initial plan * Make ID property configurable in LSMVectorIndex Co-authored-by: lvca <[email protected]> * Remove test database files and add to .gitignore Co-authored-by: lvca <[email protected]> * Improve documentation for metadata JSON configuration Co-authored-by: lvca <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: lvca <[email protected]> Co-authored-by: Luca Garulli <[email protected]> * First version with jvector * Implemented compaction of vector indexes * Added test cases * Fixed compilation problems * Fixed test cases, now all pass * Refactor vector index using the transaction index changes instead of internal map (with threadId) * feat: integrated new vector index with the `database import` command * Supported lsmvector in `vectorNeighbors()` sql function * Upgraded to jvector 4.0.0-rc.6 * Update LSMVectorIndexCompacted.java fix: error after compaction * Fix ComparableVector Comparable contract violation (#2817) * Initial plan * Fix ComparableVector to maintain Comparable contract Co-authored-by: lvca <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: lvca <[email protected]> * Apply suggestion from @Copilot Co-authored-by: Copilot <[email protected]> * Return similarity scores from LSMVectorIndex to avoid redundant distance recalculation (#2820) * Initial plan * Add findNeighborsFromVector method to LSMVectorIndex to return scores directly Co-authored-by: lvca <[email protected]> * Remove test artifacts and update .gitignore Co-authored-by: lvca <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: lvca <[email protected]> * Add mutable flag to vector index pages for safe compaction (#2819) * Initial plan * Add mutable byte indicator to vector index pages - Added mutable flag byte at offset 8 in page header (after offsetFreeContent and numberOfEntries) - New pages are created with mutable=1 (actively being written to) - Pages are marked as immutable (mutable=0) when they become full and a new page is created - Updated findLastImmutablePage() to scan from end backwards and stop at first immutable page - Updated all page reading/writing code to account for the mutable byte in header - All vector index tests passing Co-authored-by: lvca <[email protected]> * Remove test database files and update .gitignore Co-authored-by: lvca <[email protected]> * Add constants for page header offsets to improve maintainability - Added OFFSET_FREE_CONTENT, OFFSET_NUM_ENTRIES, OFFSET_MUTABLE, and HEADER_BASE_SIZE constants - Replaced magic numbers throughout the code with named constants - Makes the code more maintainable and self-documenting Co-authored-by: lvca <[email protected]> * Update comments to reference constants instead of hardcoded offsets Co-authored-by: lvca <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: lvca <[email protected]> Co-authored-by: Luca Garulli <[email protected]> * Make LSMVectorIndex ID property configurable (#2818) * Initial plan * Make ID property configurable in LSMVectorIndex Co-authored-by: lvca <[email protected]> * Remove test database files and add to .gitignore Co-authored-by: lvca <[email protected]> * Improve documentation for metadata JSON configuration Co-authored-by: lvca <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: lvca <[email protected]> Co-authored-by: Luca Garulli <[email protected]> * fix pre-commit * Update engine/src/main/java/com/arcadedb/database/TransactionIndexContext.java Co-authored-by: Copilot <[email protected]> * Fixed compaction * test: fixed test --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: lvca <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Roberto Franchini <[email protected]>
robfrank
pushed a commit
that referenced
this pull request
Feb 11, 2026
* First version with jvector * Implemented compaction of vector indexes * Added test cases * Fixed compilation problems * Fixed test cases, now all pass * Refactor vector index using the transaction index changes instead of internal map (with threadId) * feat: integrated new vector index with the `database import` command * Supported lsmvector in `vectorNeighbors()` sql function * Upgraded to jvector 4.0.0-rc.6 * Update LSMVectorIndexCompacted.java fix: error after compaction * Fix ComparableVector Comparable contract violation (#2817) * Initial plan * Fix ComparableVector to maintain Comparable contract Co-authored-by: lvca <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: lvca <[email protected]> * Apply suggestion from @Copilot Co-authored-by: Copilot <[email protected]> * Return similarity scores from LSMVectorIndex to avoid redundant distance recalculation (#2820) * Initial plan * Add findNeighborsFromVector method to LSMVectorIndex to return scores directly Co-authored-by: lvca <[email protected]> * Remove test artifacts and update .gitignore Co-authored-by: lvca <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: lvca <[email protected]> * Add mutable flag to vector index pages for safe compaction (#2819) * Initial plan * Add mutable byte indicator to vector index pages - Added mutable flag byte at offset 8 in page header (after offsetFreeContent and numberOfEntries) - New pages are created with mutable=1 (actively being written to) - Pages are marked as immutable (mutable=0) when they become full and a new page is created - Updated findLastImmutablePage() to scan from end backwards and stop at first immutable page - Updated all page reading/writing code to account for the mutable byte in header - All vector index tests passing Co-authored-by: lvca <[email protected]> * Remove test database files and update .gitignore Co-authored-by: lvca <[email protected]> * Add constants for page header offsets to improve maintainability - Added OFFSET_FREE_CONTENT, OFFSET_NUM_ENTRIES, OFFSET_MUTABLE, and HEADER_BASE_SIZE constants - Replaced magic numbers throughout the code with named constants - Makes the code more maintainable and self-documenting Co-authored-by: lvca <[email protected]> * Update comments to reference constants instead of hardcoded offsets Co-authored-by: lvca <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: lvca <[email protected]> Co-authored-by: Luca Garulli <[email protected]> * Make LSMVectorIndex ID property configurable (#2818) * Initial plan * Make ID property configurable in LSMVectorIndex Co-authored-by: lvca <[email protected]> * Remove test database files and add to .gitignore Co-authored-by: lvca <[email protected]> * Improve documentation for metadata JSON configuration Co-authored-by: lvca <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: lvca <[email protected]> Co-authored-by: Luca Garulli <[email protected]> * First version with jvector * Implemented compaction of vector indexes * Added test cases * Fixed compilation problems * Fixed test cases, now all pass * Refactor vector index using the transaction index changes instead of internal map (with threadId) * feat: integrated new vector index with the `database import` command * Supported lsmvector in `vectorNeighbors()` sql function * Upgraded to jvector 4.0.0-rc.6 * Update LSMVectorIndexCompacted.java fix: error after compaction * Fix ComparableVector Comparable contract violation (#2817) * Initial plan * Fix ComparableVector to maintain Comparable contract Co-authored-by: lvca <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: lvca <[email protected]> * Apply suggestion from @Copilot Co-authored-by: Copilot <[email protected]> * Return similarity scores from LSMVectorIndex to avoid redundant distance recalculation (#2820) * Initial plan * Add findNeighborsFromVector method to LSMVectorIndex to return scores directly Co-authored-by: lvca <[email protected]> * Remove test artifacts and update .gitignore Co-authored-by: lvca <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: lvca <[email protected]> * Add mutable flag to vector index pages for safe compaction (#2819) * Initial plan * Add mutable byte indicator to vector index pages - Added mutable flag byte at offset 8 in page header (after offsetFreeContent and numberOfEntries) - New pages are created with mutable=1 (actively being written to) - Pages are marked as immutable (mutable=0) when they become full and a new page is created - Updated findLastImmutablePage() to scan from end backwards and stop at first immutable page - Updated all page reading/writing code to account for the mutable byte in header - All vector index tests passing Co-authored-by: lvca <[email protected]> * Remove test database files and update .gitignore Co-authored-by: lvca <[email protected]> * Add constants for page header offsets to improve maintainability - Added OFFSET_FREE_CONTENT, OFFSET_NUM_ENTRIES, OFFSET_MUTABLE, and HEADER_BASE_SIZE constants - Replaced magic numbers throughout the code with named constants - Makes the code more maintainable and self-documenting Co-authored-by: lvca <[email protected]> * Update comments to reference constants instead of hardcoded offsets Co-authored-by: lvca <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: lvca <[email protected]> Co-authored-by: Luca Garulli <[email protected]> * Make LSMVectorIndex ID property configurable (#2818) * Initial plan * Make ID property configurable in LSMVectorIndex Co-authored-by: lvca <[email protected]> * Remove test database files and add to .gitignore Co-authored-by: lvca <[email protected]> * Improve documentation for metadata JSON configuration Co-authored-by: lvca <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: lvca <[email protected]> Co-authored-by: Luca Garulli <[email protected]> * fix pre-commit * Update engine/src/main/java/com/arcadedb/database/TransactionIndexContext.java Co-authored-by: Copilot <[email protected]> * Fixed compaction * test: fixed test --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: lvca <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Roberto Franchini <[email protected]> (cherry picked from commit c470e6d)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
SQLFunctionVectorNeighborsfunction hardcodedWHERE name = ?when querying vertices by ID, which fails for vertex types using a different identifier property.Changes
LSMVectorIndexBuilder
idPropertyNamefield (defaults to"id")withIdProperty(String)method and JSON metadata supportLSMVectorIndex
idPropertyNamefield, persisted in metadata JSONgetIdPropertyName()getterSQLFunctionVectorNeighbors
"name"Usage
Backward compatible: defaults to
"id"when not specified.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.