-
Notifications
You must be signed in to change notification settings - Fork 990
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
feat(search): HNSW #1799
feat(search): HNSW #1799
Conversation
70d8c59
to
56fe552
Compare
56fe552
to
5e08d22
Compare
Signed-off-by: Vladislav Oleshko <[email protected]>
5e08d22
to
d870abb
Compare
Signed-off-by: Vladislav Oleshko <[email protected]>
} | ||
|
||
private: | ||
using SpaceUnion = std::variant<hnswlib::L2Space, hnswlib::InnerProductSpace>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love the name 😆
|
||
bool use_hnsw = parser->ToUpper().Next().Case("HNSW", true).Case("FLAT", false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better than 5+ lines if {} else if {} else reply
😼 (because we need to report if its neither flat or hnsw and the argument parser does this under the hood)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't get me wrong, I'm not saying it's bad. It's great, readable, no complaints.
I was just blown away that this is C++ and not, idk, Python 🤣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Properly designed C++ code can be cool as well 🤓 🧙🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't get me wrong, I'm not saying it's bad. It's great, readable, no complaints.
I was just blown away that this is C++ and not, idk, Python
How do you feel about std::ranges
then ? 😛
1050409
to
1f17f56
Compare
No description provided.