MiniSearch
follows semantic versioning.
- [fix] Fix TypeScript definition for
storeFields
option (by @ryan-codingintrigue)
- [fix] Fix TypeScript definition for
fuzzy
option (by @alessandrobardini)
- [fix] Fix TypeScript definitions adding
filter
andstoreFields
options (by @emilianox)
-
[feature] Add support for stored fields
-
[feature] Add filtering of search results and auto suggestions
- Better TypeScript definitions (by @samuelmeuli)
- Add TypeScript definitions for ease of use in TypeScript projects
- [fix] tokenizer behavior with newline characters (by @samuelmeuli)
- Fix small imprecision in documentation
- Add
addAllAsync
method, adding many documents asynchronously and in chunks to avoid blocking the main thread
- Throw a more descriptive error when
loadJSON
is called without options
This release introduces better defaults. It is considered a major release, as the default options are slightly different, but the API is not changed.
-
Breaking change: default tokenizer splits by Unicode space or punctuation (before it was splitting by space, punctuation, or symbol). The difference is that currency symbols and other non-punctuation symbols will not be discarded: "it's 100€" is now tokenized as
["it", "s", "100€"]
instead of["it", "s", "100"]
. -
Breaking change: default term processing does not discard 1-character words.
-
Breaking change: auto suggestions by default perform prefix search only on the last term in the query. So "super cond" will suggest "super conductivity", but not "superposition condition".
- Better and more compact regular expression in the default tokenizer, separating on Unicode spaces, punctuation, and symbols
- Support for non-latin scripts
- Improve fuzzy search performance (common cases are now ~4x faster, as shown by the benchmark)
- Add possibility to configure a custom field extraction function by setting
the
extractField
option (to support cases like nested fields, non-string fields, getter methods, field pre-processing, etc.)
- Add
getDefault
static method to get the default value of configuration options
- Do not minify library when published as NPM package. Run
yarn build-minified
(ornpm run build-minified
) to produce a minified build with source maps. - Bugfix: as per specification,
processTerm
is called with only one argument upon search (see #5)
- Add possibility to configure separate index-time and search-time tokenization and term processing functions
- The
processTerm
function can now reject a term by returning a falsy value - Upon indexing, the
tokenize
andprocessTerm
functions receive the field name as the second argument. This makes it possible to process or tokenize each field differently.
- Reduce bundle size by optimizing babel preset env options
Production-ready release.
Features:
- Space-optimized index
- Exact match, prefix match, fuzzy search
- Auto suggestions
- Add/remove documents at any time