Skip to content

Support LIKE, REGEXP, GLOB operations on vec0 metadata filtering #191

Description

@asg017

TEXT vec0 metadata filters only allow comparisions and EQ/NE constraints. Can we support LIKE, REGEXP, and GLOB?

For like/glob, there are C functions we can call, though unsure how escaping works

For regexp, it depends on what regexp extension is loaded (if any). we could just shell out and call regexp() directly with SQL, but would that be fast?

https://www.sqlite.org/vtab.html#the_xbestindex_method
#define SQLITE_INDEX_CONSTRAINT_LIKE 65 /* 3.10.0 and later */
#define SQLITE_INDEX_CONSTRAINT_GLOB 66 /* 3.10.0 and later */
#define SQLITE_INDEX_CONSTRAINT_REGEXP 67 /* 3.10.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