The WHERE clause does not support LIKE
CREATE VIRTUAL TABLE IF NOT EXISTS vec_document_chunk USING vec0(
id TEXT,
documentID TEXT,
knowledgeBaseID TEXT,
embedding float[1024],
sortNo INT,
status INT
);
SELECT rowid,distance as score,* FROM vec_document_chunk WHERE embedding MATCH ? and knowledgeBaseID like ? ORDER BY score LIMIT 5
An illegal WHERE constraint was provided on a vec0 metadata column in a KNN query. Only one of EQUALS, GREATER_THAN, LESS_THAN_OR_EQUAL, LESS_THAN, GREATER_THAN_OR_EQUAL, NOT_EQUALS is allowed.
Thanks for filing - yes LIKE isn't supported yet. Can I ask what pattern you're using in your example? If you're comparing exact IDs, you could also use knowledgeBaseID = ? if you're using an exact match.
Nonetheless, LIKE support requires some special handling, because the internal representation of text metadata stores the first 12 bytes of a string in an easy-to-access cache and the rest in a separate buffer. Would could easily support LIKE patterns that end with a wildcard, ex `name LIKE 'Ale%', but more complex patterns may be more difficult.
It can support LIKE patterns that end with a wildcard. Thank you very much.
Thanks for filing - yes
LIKEisn't supported yet. Can I ask whatpatternyou're using in your example? If you're comparing exact IDs, you could also useknowledgeBaseID = ?if you're using an exact match.Nonetheless,
LIKEsupport requires some special handling, because the internal representation of text metadata stores the first 12 bytes of a string in an easy-to-access cache and the rest in a separate buffer. Would could easily support LIKE patterns that end with a wildcard, ex `name LIKE 'Ale%', but more complex patterns may be more difficult.
@asg017 Do you have a plan to implement like 'abc%' ?