Added support for inline filtering with IVFFlat

This commit is contained in:
Andrew Kane
2024-10-10 17:07:47 -07:00
parent 48fe70c219
commit 116501f062
8 changed files with 262 additions and 1 deletions

View File

@@ -24,3 +24,5 @@ CREATE CAST (double precision[] AS sparsevec)
CREATE CAST (numeric[] AS sparsevec)
WITH FUNCTION array_to_sparsevec(numeric[], integer, boolean) AS ASSIGNMENT;
-- TODO add ivfflat attributes

View File

@@ -916,3 +916,13 @@ CREATE OPERATOR CLASS sparsevec_l1_ops
OPERATOR 1 <+> (sparsevec, sparsevec) FOR ORDER BY float_ops,
FUNCTION 1 l1_distance(sparsevec, sparsevec),
FUNCTION 3 hnsw_sparsevec_support(internal);
-- ivfflat attributes
CREATE OPERATOR CLASS vector_integer_ops
DEFAULT FOR TYPE integer USING ivfflat AS
OPERATOR 2 < ,
OPERATOR 3 <= ,
OPERATOR 4 = ,
OPERATOR 5 >= ,
OPERATOR 6 > ;