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

Support the IS and ISNOT operator on vec0 metadata filterins #190

Open
asg017 opened this issue Jan 27, 2025 · 0 comments
Open

Support the IS and ISNOT operator on vec0 metadata filterins #190

asg017 opened this issue Jan 27, 2025 · 0 comments

Comments

@asg017
Copy link
Owner

asg017 commented Jan 27, 2025

Came up in Discord, some people might use the IS operator in certain metadata filters, like:

select *
from vec_items
where embedding match ?
  and k = 20
  and is_hidden is false -- not supported yet!

We only override the = operator, not IS.

Need to read up on the IS operator — is it always the same as the EQ operation?

// https://www.sqlite.org/vtab.html#the_xbestindex_method
#define SQLITE_INDEX_CONSTRAINT_ISNOT     69  /* 3.21.0 and later */
#define SQLITE_INDEX_CONSTRAINT_ISNOTNULL 70  /* 3.21.0 and later */
#define SQLITE_INDEX_CONSTRAINT_ISNULL    71  /* 3.21.0 and later */
#define SQLITE_INDEX_CONSTRAINT_IS        72  /* 3.21.0 and later */
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

No branches or pull requests

1 participant