(limit)
| 54 | // client_id post-filtering without collapsing recall on sparse tenants, capped |
| 55 | // so a huge limit can't blow up query latency. |
| 56 | export function clampEfSearch(limit) { |
| 57 | const n = Number.isFinite(limit) ? Math.floor(limit) : 10; |
| 58 | return Math.max(40, Math.min(n * 2, 400)); |
| 59 | } |
| 60 | |
| 61 | // Whether >2000-dim vectors force the halfvec code path. |
| 62 | export function halfvecMode(dims) { |
no outgoing calls
no test coverage detected