From 8a8c310396b9b6ae9274d988e188421d82bddc4c Mon Sep 17 00:00:00 2001 From: Tommy Smith Date: Tue, 16 Sep 2025 13:55:45 +0100 Subject: [PATCH] Assert alpha is not undefined to avoid falsey on alpha=0 --- src/collections/serialize/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/collections/serialize/index.ts b/src/collections/serialize/index.ts index bd1a834f..815c8b50 100644 --- a/src/collections/serialize/index.ts +++ b/src/collections/serialize/index.ts @@ -1082,7 +1082,7 @@ export class Serialize { await Serialize.hybridVector(args); return Hybrid.fromPartial({ query: args.query, - alpha: args.alpha ? args.alpha : 0.5, + alpha: args.alpha !== undefined ? args.alpha : 0.5, properties: this.bm25QueryProperties(args.queryProperties), vectorBytes: vectorBytes, vectorDistance: args.maxVectorDistance,