Skip to content

Commit 6a4164d

Browse files
authored
Assert alpha is not undefined to avoid falsey on alpha=0 (#347)
1 parent e36e54d commit 6a4164d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/collections/serialize/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ export class Serialize {
10821082
await Serialize.hybridVector(args);
10831083
return Hybrid.fromPartial({
10841084
query: args.query,
1085-
alpha: args.alpha ? args.alpha : 0.5,
1085+
alpha: args.alpha !== undefined ? args.alpha : 0.5,
10861086
properties: this.bm25QueryProperties(args.queryProperties),
10871087
vectorBytes: vectorBytes,
10881088
vectorDistance: args.maxVectorDistance,

0 commit comments

Comments
 (0)