Stored fields for a document id, when configured via Options.storeFields.
Returns undefined if the id is missing or no fields were stored.
Whether a document with the given external id is in the index.
External ids of the documents matching query, in insertion order, without
scores, match information or result objects (FrozenMiniSearch extension). They
are the documents of an unbounded search with the same options.
A filter, local or from the index-level search options, throws: it needs complete
results. Pass filter: undefined to disable an index-level filter. A local limit
throws too, since the method returns every match; an index-level limit is ignored.
boostDocument must be deterministic. As in search, a document does not
match a query term when it returns a falsy value for every term derived from it
(exact, prefix or fuzzy). A wildcard query returns every document without calling
it, since search keeps them all, with their boosted scores.
Non-blocking snapshot serialization with the selected compression codec.
Serialize this index as a frozen binary snapshot (synchronous).
Search the index. API and scoring match MiniSearch 7 for the same options.
query may be a string, FrozenMiniSearchCore.wildcard, or a nested
QueryCombination. Per-query options override index defaults from
Options.searchOptions; see SearchOptions for boosts, prefix,
fuzzy, filters, and combineWith.
With matchInfo: false (FrozenMiniSearch extension), results have the same
scores and order but no terms or match, and the search skips building them.
A filter, including an index-level one, then receives these reduced results.
Matches sorted by descending score.
Search the index. API and scoring match MiniSearch 7 for the same options.
query may be a string, FrozenMiniSearchCore.wildcard, or a nested
QueryCombination. Per-query options override index defaults from
Options.searchOptions; see SearchOptions for boosts, prefix,
fuzzy, filters, and combineWith.
With matchInfo: false (FrozenMiniSearch extension), results have the same
scores and order but no terms or match, and the search skips building them.
A filter, including an index-level one, then receives these reduced results.
OptionalsearchOptions: SearchOptions & { matchInfo?: true }Matches sorted by descending score.
Return a page in the same order as an unbounded search, with an exact
total after filtering. The page size is explicit and overrides index defaults.
All candidate scores are computed once. Filters run on every candidate, even
for an empty page; without a filter, only returned results are materialized.
Assumes finite scores and deterministic filters, as with bounded search.
matchInfo: false returns results without terms or match, as with search.
Return a page in the same order as an unbounded search, with an exact
total after filtering. The page size is explicit and overrides index defaults.
All candidate scores are computed once. Filters run on every candidate, even
for an empty page; without a filter, only returned results are materialized.
Assumes finite scores and deterministic filters, as with bounded search.
matchInfo: false returns results without terms or match, as with search.
Export this index as a MiniSearch wire snapshot (serializationVersion: 2).
Use for migration or interchange with the minisearch package (JSON.stringify works via this method).
Term order in index may differ from MiniSearch native toJSON; search scores stay equivalent.
StaticfromBuild a read-only index from an async stream of documents (e.g. CSV parser).
For sync iterables, use createFrozenIndexBuilder with for...of instead.
StaticfromBuild a read-only index in one pass from an in-memory document array.
Indexing semantics match MiniSearch addAll for the same Options.
For custom ingestion (streaming, per-document transforms), use createFrozenIndexBuilder and freezeFrozenIndexBuilder instead. The named export buildFrozenFromDocuments is equivalent on the Node/browser entry.
StaticfromStaticgetBuilt-in default for indexing / load options (tokenize, processTerm, extractField, …).
StaticloadLoad a frozen binary snapshot with streaming decompression when needed (bounded memory).
Staticload
Without a
filter, aggregates suggestions from raw query hits (no full result materialization). With afilter, uses search so stored fields are available to the predicate.