@wiscale/velesdb-wasm 1.7.0 → 1.7.1

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 CHANGED
@@ -108,11 +108,20 @@ class VectorStore {
108
108
  multi_query_search(vectors: Float32Array, num_vectors: number, k: number, strategy?: string, rrf_k?: number): Array<[bigint, number]>;
109
109
  hybrid_search(vector: Float32Array, text_query: string, k: number, vector_weight?: number): Array<{id, score, payload}>;
110
110
  batch_search(vectors: Float32Array, num_vectors: number, k: number): Array<Array<[bigint, number]>>;
111
-
112
- // Sparse search (inverted index)
111
+ similarity_search(query: Float32Array, threshold: number, operator: string, k: number): Array<[bigint, number]>;
112
+ query(query_vector: Float32Array, k: number): Array<{nodeId, vectorScore, graphScore, fusedScore, bindings, columnData}>;
113
+
114
+ // Sparse search (inverted index, on VectorStore)
113
115
  sparse_insert(doc_id: bigint, indices: Uint32Array, values: Float32Array): void;
114
116
  sparse_search(indices: Uint32Array, values: Float32Array, k: number): Array<{doc_id, score}>;
115
117
 
118
+ // Persistence
119
+ save(db_name: string): Promise<void>;
120
+ static load(db_name: string): Promise<VectorStore>;
121
+ static delete_database(db_name: string): Promise<void>;
122
+ export_to_bytes(): Uint8Array;
123
+ static import_from_bytes(bytes: Uint8Array): VectorStore;
124
+
116
125
  // Metadata-only store
117
126
  static new_metadata_only(): VectorStore;
118
127
  readonly is_metadata_only: boolean;
@@ -264,14 +273,14 @@ The WASM build is optimized for client-side use cases but has some limitations c
264
273
  |---------|------|-------------|
265
274
  | Vector search (NEAR) | ✅ | ✅ |
266
275
  | Metadata filtering | ✅ | ✅ |
267
- | Hybrid search (vector + BM25) | ✅ | ✅ |
268
- | Full-text search (BM25) | ✅ | ✅ |
276
+ | Hybrid search (vector + text) | ✅ | ✅ |
277
+ | Full-text search | ✅ | ✅ |
269
278
  | Multi-query fusion (MQG) | ✅ | ✅ |
270
279
  | Batch search | ✅ | ✅ |
271
280
  | Sparse search | ✅ | ✅ |
272
281
  | Knowledge Graph (nodes, edges, traversal) | ✅ | ✅ |
273
282
  | Agent Memory (SemanticMemory) | ✅ | ✅ |
274
- | VelesQL parsing & validation | ✅ | ✅ |
283
+ | VelesQL parsing and validation | ✅ | ✅ |
275
284
  | VelesQL query execution | ❌ | ✅ |
276
285
  | JOIN operations | ❌ | ✅ |
277
286
  | Aggregations (GROUP BY) | ❌ | ✅ |
@@ -347,8 +356,8 @@ memory.store(2n, "Berlin is the capital of Germany", embedding2);
347
356
  const results = memory.query(queryEmbedding, 5);
348
357
  // [{id, score, content}, ...]
349
358
 
350
- console.log(memory.len); // 2
351
- console.log(memory.dimension); // 384
359
+ console.log(memory.len()); // 2
360
+ console.log(memory.dimension()); // 384
352
361
  ```
353
362
 
354
363
  ### Sparse Search (SparseIndex)
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "Julien Lange <contact@wiscale.fr>"
6
6
  ],
7
7
  "description": "VelesDB for WebAssembly - Vector search in the browser",
8
- "version": "1.7.0",
8
+ "version": "1.7.1",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
package/velesdb_wasm.d.ts CHANGED
@@ -976,10 +976,10 @@ export interface InitOutput {
976
976
  readonly graphnode_id: (a: number) => bigint;
977
977
  readonly __wbg_get_traversalprogress_is_complete: (a: number) => number;
978
978
  readonly __wbg_traversalprogress_free: (a: number, b: number) => void;
979
- readonly __wasm_bindgen_func_elem_1315: (a: number, b: number) => void;
979
+ readonly __wasm_bindgen_func_elem_1318: (a: number, b: number) => void;
980
980
  readonly __wasm_bindgen_func_elem_291: (a: number, b: number) => void;
981
- readonly __wasm_bindgen_func_elem_1316: (a: number, b: number, c: number, d: number) => void;
982
- readonly __wasm_bindgen_func_elem_1356: (a: number, b: number, c: number, d: number) => void;
981
+ readonly __wasm_bindgen_func_elem_1319: (a: number, b: number, c: number, d: number) => void;
982
+ readonly __wasm_bindgen_func_elem_1359: (a: number, b: number, c: number, d: number) => void;
983
983
  readonly __wasm_bindgen_func_elem_292: (a: number, b: number, c: number) => void;
984
984
  readonly __wbindgen_export: (a: number, b: number) => number;
985
985
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
package/velesdb_wasm.js CHANGED
@@ -2537,7 +2537,7 @@ function __wbg_get_imports() {
2537
2537
  const a = state0.a;
2538
2538
  state0.a = 0;
2539
2539
  try {
2540
- return __wasm_bindgen_func_elem_1356(a, state0.b, arg0, arg1);
2540
+ return __wasm_bindgen_func_elem_1359(a, state0.b, arg0, arg1);
2541
2541
  } finally {
2542
2542
  state0.a = a;
2543
2543
  }
@@ -2559,7 +2559,7 @@ function __wbg_get_imports() {
2559
2559
  const a = state0.a;
2560
2560
  state0.a = 0;
2561
2561
  try {
2562
- return __wasm_bindgen_func_elem_1356(a, state0.b, arg0, arg1);
2562
+ return __wasm_bindgen_func_elem_1359(a, state0.b, arg0, arg1);
2563
2563
  } finally {
2564
2564
  state0.a = a;
2565
2565
  }
@@ -2692,8 +2692,8 @@ function __wbg_get_imports() {
2692
2692
  return addHeapObject(ret);
2693
2693
  },
2694
2694
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
2695
- // Cast intrinsic for `Closure(Closure { dtor_idx: 143, function: Function { arguments: [Externref], shim_idx: 144, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2696
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1315, __wasm_bindgen_func_elem_1316);
2695
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 141, function: Function { arguments: [Externref], shim_idx: 142, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2696
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1318, __wasm_bindgen_func_elem_1319);
2697
2697
  return addHeapObject(ret);
2698
2698
  },
2699
2699
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
@@ -2739,10 +2739,10 @@ function __wasm_bindgen_func_elem_292(arg0, arg1, arg2) {
2739
2739
  wasm.__wasm_bindgen_func_elem_292(arg0, arg1, addHeapObject(arg2));
2740
2740
  }
2741
2741
 
2742
- function __wasm_bindgen_func_elem_1316(arg0, arg1, arg2) {
2742
+ function __wasm_bindgen_func_elem_1319(arg0, arg1, arg2) {
2743
2743
  try {
2744
2744
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2745
- wasm.__wasm_bindgen_func_elem_1316(retptr, arg0, arg1, addHeapObject(arg2));
2745
+ wasm.__wasm_bindgen_func_elem_1319(retptr, arg0, arg1, addHeapObject(arg2));
2746
2746
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2747
2747
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2748
2748
  if (r1) {
@@ -2753,8 +2753,8 @@ function __wasm_bindgen_func_elem_1316(arg0, arg1, arg2) {
2753
2753
  }
2754
2754
  }
2755
2755
 
2756
- function __wasm_bindgen_func_elem_1356(arg0, arg1, arg2, arg3) {
2757
- wasm.__wasm_bindgen_func_elem_1356(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
2756
+ function __wasm_bindgen_func_elem_1359(arg0, arg1, arg2, arg3) {
2757
+ wasm.__wasm_bindgen_func_elem_1359(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
2758
2758
  }
2759
2759
 
2760
2760
 
Binary file