vectlite 0.9.1 → 0.9.2

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/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
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "vectlite-node"
3
- version = "0.9.1"
3
+ version = "0.9.2"
4
4
  edition = "2024"
5
5
  license = "MIT"
6
6
  description = "Node.js bindings for vectlite."
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "vectlite-core"
3
- version = "0.9.1"
3
+ version = "0.9.2"
4
4
  edition = "2024"
5
5
  license = "MIT"
6
6
  description = "Core storage engine for vectlite."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vectlite",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "Embedded vector store for local-first AI applications.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
Binary file