minisearch
Advanced tools
Changelog
v7.1.0
boostTerm
search option to apply a custom boosting factor to specific
terms in the queryChangelog
v7.0.2
v7.0.0
.Changelog
v7.0.1
package.json
(by
@brenoepics
Changelog
v7.0.0
This is a major release, but the only real breaking change is that it targets ES6 (ES2015) and later. This means that it will not work in legacy browsers, most notably Internet Explorer 11 and earlier (by now well below 1% global usage according to https://caniuse.com). Among other benefits, this reduces the package size (from 8.8KB to 5.8KB minified and gzipped).
combineWith
search option
values, catching invalid operators at compile time. Note that this is a
breaking change only if one was using unlikely weird casing for the
combineWith
option. For example, AND
, and
, And
are all still valid,
but aNd
won't compile anymore.combineWith
in JavaScript (in TypeScript this would be a compile time error)loadJSONAsync
method, to load a serialized index asynchronouslyChangelog
v6.3.0 - 2023-11-22
queryTerms
array to the search results. This is useful to determine
which query terms were matched by each search result.Changelog
v6.2.0 - 2023-10-26
MiniSearch.wildcard
to
match all documents, but still apply search options like filtering and
document boostingChangelog
v6.1.0 - 2023-05-15
Add getStoredFields
method to retrieve the stored fields for a document
given its ID.
boostDocument
callback function, making it
easier to perform dynamic document boosting.Changelog
v6.0.1 - 2023-02-01
boost
search option now does not interfere with the fields
search option: if fields
is specified, boosting a field that is not
included in fields
has no effect, and will not include such boosted field
in the search.
search
with a QuerySpec
, the combineWith
option is
now properly taking its default from the SearchOptions
given as the second
argument.Changelog
v6.0.0 - 2022-12-01
This is a major release. The most notable change is the addition of discard
,
discardAll
, and replace
. These method make it more convenient and performant
to remove or replace documents.
This release is almost completely backwards compatible with v5
, apart from one
breaking change in the behavior of add
when the document ID already exists.
Changes:
add
, addAll
, and addAllAsync
now throw an error on
duplicate document IDs. When necessary, it is now possible to check for the
existence of a document with a certain ID with the new method has
.discard
method to remove documents by ID. This is a convenient
alternative to remove
that takes only the ID of the documents to remove,
as opposed to the whole document. The visible effect is the same as
remove
. The difference is that remove
immediately mutates the index,
while discard
marks the current document version as discarded, so it is
immedately ignored by searches, but delays modifying the index until a
certain number of documents are discarded. At that point, a vacuuming is
triggered, cleaning up the index from obsolete references and allowing
memory to be released.discardAll
and replace
methods, built on top of discard
autoVacuum
constructor option),
or can be triggered manually by calling the vacuum
method. The new
dirtCount
and dirtFactor
properties give the current value of the
parameters used to decide whether to trigger an automatic vacuuming.termCount
property, giving the number of distinct terms present in the
indexbm25
search option.readonly
, signaling that it won't be mutated, and allowing passing
readonly arrays.loadJS
static method in subclasses