1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-09-02 18:33:17 +02:00

refactor index.js filenames #481

This commit is contained in:
Thomas Wilkerling
2025-03-26 19:33:16 +01:00
parent bbccf2d1a6
commit 48e78116d7
51 changed files with 79 additions and 57 deletions

View File

@@ -5,12 +5,11 @@ IndexedDB is a persistent storage supported by all major browsers.
Create an index and assign a IndexedDB storage adapter to it by using `index.mount(db)`:
```js
import Index from "./index.js";
import Database from "./db/indexeddb/index.js";
import { Index, IndexedDB } from "../dist/flexsearch.bundle.module.min.js";
// create an index
const index = new Index();
// create db instance with optional namespace
const db = new Database("my-store");
const db = new IndexedDB("my-store");
// mount and await before transfering data
await index.mount(db);