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

remove redundant judgments during the HNSW search process #38

Merged
merged 2 commits into from
Sep 24, 2024
Merged

Conversation

inabao
Copy link
Collaborator

@inabao inabao commented Sep 24, 2024

No description provided.

jinjiabao.jjb added 2 commits September 24, 2024 14:54
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
@wxyucs wxyucs added the kind/improvement Code improvements (variable/function renaming, refactoring, etc. ) label Sep 24, 2024
@wxyucs wxyucs self-assigned this Sep 24, 2024
@wxyucs wxyucs requested a review from jiaweizone September 24, 2024 07:07
@@ -1404,13 +1404,9 @@ HierarchicalNSW::searchKnn(const void* query_data,
}

MaxHeap top_candidates;
if (num_deleted_) {
top_candidates =
searchBaseLayerST<true, true>(currObj, query_data, std::max(ef, k), isIdAllowed);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why remove this logic ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

num_deleted_ is the original logic for marking deletions in HNSW, but we no longer rely on this logic.

Copy link
Collaborator

@jiaweizone jiaweizone left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@wxyucs wxyucs left a comment

Choose a reason for hiding this comment

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

lgtm

@wxyucs wxyucs merged commit 351e716 into main Sep 24, 2024
2 checks passed
@wxyucs wxyucs deleted the fix-bug branch September 24, 2024 11:31
inabao added a commit that referenced this pull request Oct 24, 2024
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/improvement Code improvements (variable/function renaming, refactoring, etc. )
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants