From a9a9f0ce87b12f7265ca2036fd0ba64a12831eeb Mon Sep 17 00:00:00 2001 From: Harlan-Epoch Date: Thu, 6 Jun 2024 09:12:27 -0400 Subject: [PATCH] Update util.ts Currently if you try to use the "in" operator with an array value in a prefilter you get an invalid argument error. By updating line 20 like I have the function now accepts the array. --- firestore-vector-search/functions/src/queries/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firestore-vector-search/functions/src/queries/util.ts b/firestore-vector-search/functions/src/queries/util.ts index 5e8bee6d..b672d67e 100644 --- a/firestore-vector-search/functions/src/queries/util.ts +++ b/firestore-vector-search/functions/src/queries/util.ts @@ -17,7 +17,7 @@ const operatorSchema = z.enum([ export const prefilterSchema = z.object({ field: z.string(), operator: operatorSchema, - value: z.string(), + value: z.union([z.string(), z.array(z.string())]), }); export const parseLimit = (limit: unknown) => {