vectlite 0.9.1 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/index.d.ts +4 -0
- package/index.js +3 -0
- package/native/Cargo.toml +1 -1
- package/native/vectlite-core/Cargo.toml +1 -1
- package/package.json +1 -1
- package/prebuilds/darwin-arm64/vectlite.node +0 -0
- package/prebuilds/darwin-x64/vectlite.node +0 -0
- package/prebuilds/linux-x64-gnu/vectlite.node +0 -0
- package/prebuilds/win32-x64-msvc/vectlite.node +0 -0
package/README.md
CHANGED
|
@@ -260,7 +260,7 @@ console.log(db.quantizationMethod) // "scalar", "binary", or "product"
|
|
|
260
260
|
db.disableQuantization()
|
|
261
261
|
```
|
|
262
262
|
|
|
263
|
-
`rescoreMultiplier` controls the number of quantized candidates rescored with exact float32 scoring: `k * rescoreMultiplier`, capped at the collection size. Increase it to trade latency for recall.
|
|
263
|
+
`rescoreMultiplier` (default **10**) controls the number of quantized candidates rescored with exact float32 scoring: `k * rescoreMultiplier`, capped at the collection size. Increase it to trade latency for recall.
|
|
264
264
|
|
|
265
265
|
For PQ, `numSubVectors` must divide the database dimension. If omitted, Vectlite chooses a compatible default; use `db.validNumSubVectors()` to inspect all valid values.
|
|
266
266
|
|
package/index.d.ts
CHANGED
|
@@ -237,12 +237,16 @@ export class Database {
|
|
|
237
237
|
snapshot(dest: string): void
|
|
238
238
|
backup(dest: string): void
|
|
239
239
|
search(request: SearchRequest): SearchResult[]
|
|
240
|
+
search(query: number[], k: number): SearchResult[]
|
|
240
241
|
search(query?: number[] | null, options?: SearchOptions): SearchResult[]
|
|
241
242
|
searchWithStats(request: SearchRequest): SearchResponse
|
|
243
|
+
searchWithStats(query: number[], k: number): SearchResponse
|
|
242
244
|
searchWithStats(query?: number[] | null, options?: SearchOptions): SearchResponse
|
|
243
245
|
searchAsync(request: SearchRequest): Promise<SearchResult[]>
|
|
246
|
+
searchAsync(query: number[], k: number): Promise<SearchResult[]>
|
|
244
247
|
searchAsync(query?: number[] | null, options?: SearchOptions): Promise<SearchResult[]>
|
|
245
248
|
searchWithStatsAsync(request: SearchRequest): Promise<SearchResponse>
|
|
249
|
+
searchWithStatsAsync(query: number[], k: number): Promise<SearchResponse>
|
|
246
250
|
searchWithStatsAsync(query?: number[] | null, options?: SearchOptions): Promise<SearchResponse>
|
|
247
251
|
flushAsync(): Promise<void>
|
|
248
252
|
compactAsync(): Promise<void>
|
package/index.js
CHANGED
|
@@ -234,6 +234,9 @@ function normalizeSearchArgs(query, options) {
|
|
|
234
234
|
const { query: normalizedQuery = null, ...normalizedOptions } = query
|
|
235
235
|
return { query: normalizedQuery, options: normalizedOptions }
|
|
236
236
|
}
|
|
237
|
+
if (typeof options === 'number') {
|
|
238
|
+
return { query, options: { k: options } }
|
|
239
|
+
}
|
|
237
240
|
return { query, options: options ?? {} }
|
|
238
241
|
}
|
|
239
242
|
|
package/native/Cargo.toml
CHANGED
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|