(p: string, idx: Index)
| 186 | } |
| 187 | |
| 188 | export async function saveIndex(p: string, idx: Index): Promise<void> { |
| 189 | await fs.mkdir(path.dirname(p), { recursive: true }); |
| 190 | await fs.writeFile(p, JSON.stringify(idx)); |
| 191 | } |
| 192 | |
| 193 | /** |
| 194 | * Persist an index in BOTH formats: the SQLite quantized store (preferred for |