Skip to content

feat!: Updated KNN index creation interface to support skipping some of source vectors#103

Merged
glookka merged 1 commit into
masterfrom
skip_knn_vectors
Jun 26, 2025
Merged

feat!: Updated KNN index creation interface to support skipping some of source vectors#103
glookka merged 1 commit into
masterfrom
skip_knn_vectors

Conversation

@glookka

@glookka glookka commented Jun 26, 2025

Copy link
Copy Markdown
Contributor

feat!: Updated KNN index creation interface to support skipping some of source vectors

@github-actions

Copy link
Copy Markdown

Linux debug test results

  8 files    8 suites   11m 24s ⏱️
486 tests 469 ✅ 17 💤 0 ❌
500 runs  483 ✅ 17 💤 0 ❌

Results for commit b56e3d0.

@github-actions

Copy link
Copy Markdown

Linux release test results

  8 files    8 suites   5m 59s ⏱️
486 tests 469 ✅ 17 💤 0 ❌
500 runs  483 ✅ 17 💤 0 ❌

Results for commit b56e3d0.

@github-actions

Copy link
Copy Markdown

Windows test results

  5 files    5 suites   16m 3s ⏱️
469 tests 452 ✅ 17 💤 0 ❌
477 runs  460 ✅ 17 💤 0 ❌

Results for commit b56e3d0.

@glookka glookka requested a review from Copilot June 26, 2025 17:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the KNN index creation API to allow skipping source vectors by passing explicit row IDs.

  • Bumps LIB_VERSION to 8
  • Extends Builder_i::Train and Builder_i::SetAttr to accept a uRowID parameter
  • Modifies HNSWIndexBuilder_c to use caller-provided row IDs and replaces its internal counter with a first-doc flag

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
knn/knn.h Bumped library version and added uRowID parameter to Builder_i
knn/knn.cpp Updated HNSW internal builder to accept uRowID, removed counter
Comments suppressed due to low confidence (2)

knn/knn.h:102

  • [nitpick] The newly added uRowID parameter on Train and SetAttr should be documented in the header (e.g. a brief doc comment) to explain its role when skipping vectors.
	virtual void	Train ( int iAttr, uint32_t uRowID, const util::Span_T<float> & dData ) = 0;

knn/knn.cpp:394

  • [nitpick] There are no tests covering the new behavior where uRowID may be non-sequential or skipped; consider adding unit tests to verify correct indexing when callers supply custom row IDs.
		m_pAlg->addPoint ( (void*)m_dQuantized.data(), (size_t)uRowID );

@glookka glookka merged commit 7ef1e0d into master Jun 26, 2025
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants