Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add row number constraint for building scann index #185

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

chasingegg
Copy link
Collaborator

@chasingegg chasingegg commented Nov 8, 2023

Fix #183
/kind bug
When people use milvus, index will not be built(brute force search) when rows < MinSegmentNumRowsToEnableIndex(1024), https://github.com/milvus-io/milvus/blob/master/internal/datacoord/index_builder.go#L237

@sre-ci-robot sre-ci-robot added the kind/bug This PR is a bug fix label Nov 8, 2023
@sre-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chasingegg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@@ -270,6 +270,12 @@ IvfIndexNode<T>::Train(const DataSet& dataset, const Config& cfg) {
auto dim = dataset.GetDim();
auto data = dataset.GetTensor();

// faiss scann needs at least 16 rows
if (rows < 16 && std::is_same<faiss::IndexScaNN, T>::value) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

const int64_t SCANN_MIN_ROWS = 16;

if (std::is_same<faiss::IndexScaNN, T>::value) {
if (rows < SCANN_MIN_ROWS) {
.....

@cydrain
Copy link
Collaborator

cydrain commented Nov 8, 2023

/lgtm

@sre-ci-robot sre-ci-robot merged commit 107eb5f into zilliztech:main Nov 8, 2023
6 checks passed
@chasingegg chasingegg deleted the fix-scann-row branch November 8, 2023 11:00
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.

knowhere panic when create SCANN index with small rows of vectors
3 participants