Skip to content

Commit de78ad7

Browse files
committed
style: run prettier after rebase
1 parent 35a9a00 commit de78ad7

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

resources/indexes/HierarchicalNavigableSmallWorld.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ export class HierarchicalNavigableSmallWorld {
851851
loaded: any[],
852852
searchCondition: { target: number[]; distance?: string; value?: any },
853853
comparator: string,
854-
attributeName: string,
854+
attributeName: string
855855
): any[] | null {
856856
if (!this.int8 || !searchCondition.target || typeof attributeName !== 'string') return null;
857857
if (comparator === 'sort') {
@@ -870,8 +870,7 @@ export class HierarchicalNavigableSmallWorld {
870870
if (comparator === 'lt' || comparator === 'le') {
871871
const thresholdValue = searchCondition.value;
872872
const rescored = loaded.filter((e) => e !== SKIP && e && e.value);
873-
for (const e of rescored)
874-
e.distance = this.exactDistance(searchCondition, e.value[attributeName]);
873+
for (const e of rescored) e.distance = this.exactDistance(searchCondition, e.value[attributeName]);
875874
return rescored.filter((e) => (comparator === 'le' ? e.distance <= thresholdValue : e.distance < thresholdValue));
876875
}
877876
return null;

unitTests/resources/vectorIndex.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,8 @@ describeUnlessLmdb('HNSW int8 threshold queries (lt/le) — exact boundary after
12191219
);
12201220
const ids = new Set(results.map((r) => r.id));
12211221
for (const { id, sqDist } of records) {
1222-
if (sqDist < threshold) assert(ids.has(id), `record id=${id} (sq_dist=${sqDist}) must appear with lt ${threshold}`);
1222+
if (sqDist < threshold)
1223+
assert(ids.has(id), `record id=${id} (sq_dist=${sqDist}) must appear with lt ${threshold}`);
12231224
else assert(!ids.has(id), `record id=${id} (sq_dist=${sqDist}) must not appear with lt ${threshold}`);
12241225
}
12251226
});

0 commit comments

Comments
 (0)