-
Notifications
You must be signed in to change notification settings - Fork 53
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
Added dist functions from usearch #46
Conversation
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.
Looks good!
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.
Please add a test file with usage tests
- Create index with each op class and add some rows
- Use the wrong distance function in an order by and assure the index is not used (via
explain
)
f195bd5
to
6fc2dd2
Compare
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.
This is amazing!
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.
Did another pass over this.
|
||
CREATE TABLE small_world_l2_vec ( | ||
id varchar(3), | ||
vector vector(3) |
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.
Would be good to vactor this into a separate file (e.g. pgvector_compat.sql
)
We will need to then move all the other tests that require pgvector into this file so we could make pgvector dependency optional for running tests as well.
Description
Added new dist functions
cos_dist
andhamming_dist
which will use usearch implementations you can refer to this PR for more information.l2sq_dist
function now will also use usearch implementation.TODO
Issue
closes #34