Skip to content

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

Description

@asg017

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 */

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions