diff --git a/CHANGELOG.md b/CHANGELOG.md index ebb91ab7..c1644fbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - More informative error when specifying an invalid value for `combineWith` in JavaScript (in TypeScript this would be a compile time error) - Use the Unicode flag to simplify the tokenizer regular expression + - Add `loadJSONAsync` method, to load a serialized index asynchronously ## v6.3.0 - 2023-11-22 diff --git a/src/MiniSearch.ts b/src/MiniSearch.ts index fb4cc659..d2c67528 100644 --- a/src/MiniSearch.ts +++ b/src/MiniSearch.ts @@ -1476,6 +1476,12 @@ export default class MiniSearch { /** * Async equivalent of {@link MiniSearch.loadJSON} * + * This function is an alternative to {@link MiniSearch.loadJSON} that returns + * a promise, and loads the index in batches, leaving pauses between them to avoid + * blocking the main thread. It tends to be slower than the synchronous + * version, but does not block the main thread, so it can be a better choice + * when deserializing very large indexes. + * * @param json JSON-serialized index * @param options configuration options, same as the constructor * @return A Promise that will resolve to an instance of MiniSearch deserialized from the given JSON.