Skip to content

Conversation

lerman25
Copy link
Collaborator

@lerman25 lerman25 commented Jul 1, 2025

This PR refactors the serialization logic for vector indexes by introducing a clear abstraction layer via the Serializer base class. Both HNSWSerializer and SVSSerializer now inherit from this interface, enabling:

  • Unified structure for save/load operations across index types
  • Encoding version support for backward/forward compatibility
  • Cleaner separation of shared vs. index-specific serialization logic
  • Easier extension for future index types

Each index (e.g., HNSWIndex, SVSIndex) implements its own saveIndexFields method to handle template- and implementation-specific data.


This PR also introduces support for saving/loading SVS indexes and validating their internal consistency.
Specifically:

  • Implements the Serializer interface for SVS, enabling saveIndex() and loadIndex() methods. (Using a commit created by @rfsaliev )
  • Adds a checkIntegrity() method for runtime validation of index structure and metadata.

@CLAassistant
Copy link

CLAassistant commented Jul 1, 2025

CLA assistant check
All committers have signed the CLA.

@lerman25 lerman25 marked this pull request as draft July 1, 2025 11:58
@lerman25 lerman25 force-pushed the omer-add-save-load-check branch from a3ee719 to 7af26da Compare July 1, 2025 12:15
@lerman25 lerman25 marked this pull request as ready for review July 2, 2025 10:55
@lerman25 lerman25 requested a review from meiravgri July 2, 2025 11:18
Copy link
Collaborator

@meiravgri meiravgri left a comment

Choose a reason for hiding this comment

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

Awesome!
main comments are regarding visibility :)
missing review for svs_extensions.h and svs_utils.h, will go over with @rfsaliev

lerman25 added a commit that referenced this pull request Jul 3, 2025
@alonre24 alonre24 changed the title [MOD-7022] Add serialization to SVS index [MOD-10236] Add serialization to SVS index Jul 6, 2025
meiravgri
meiravgri previously approved these changes Aug 20, 2025
@lerman25 lerman25 added this pull request to the merge queue Aug 20, 2025
@lerman25 lerman25 removed this pull request from the merge queue due to a manual request Aug 20, 2025
@lerman25 lerman25 added this pull request to the merge queue Aug 20, 2025
@lerman25 lerman25 removed this pull request from the merge queue due to a manual request Aug 20, 2025
@lerman25 lerman25 enabled auto-merge August 20, 2025 12:04
@meiravgri meiravgri self-requested a review August 20, 2025 12:08
meiravgri
meiravgri previously approved these changes Aug 20, 2025
@lerman25 lerman25 added this pull request to the merge queue Aug 20, 2025
@lerman25 lerman25 removed this pull request from the merge queue due to a manual request Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants