Socket
Socket
Sign inDemoInstall

minisearch

Package Overview
Dependencies
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minisearch - npm Package Versions

23
9

7.1.0

Diff

Changelog

Source

v7.1.0

  • Add boostTerm search option to apply a custom boosting factor to specific terms in the query
lucaong
published 7.0.2 •

Changelog

Source

v7.0.2

  • [fix] Fix regression on tokenizer producing blank terms when multiple contiguous spaces or punctuation characters are present in the input, introduced in v7.0.0.
lucaong
published 7.0.1 •

Changelog

Source

v7.0.1

  • [fix] Fix type definitions directory in package.json (by @brenoepics
    • [fix] Remove redundant versions of distribution files and simplify build
lucaong
published 7.0.0 •

Changelog

Source

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).

  • [breaking change] Target ES6 (ES2015) and later, dropping support for Internet Explorer 11 and earlier.
  • [breaking change] Better TypeScript type of 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.
  • 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
lucaong
published 6.3.0 •

Changelog

Source

v6.3.0 - 2023-11-22

  • Add queryTerms array to the search results. This is useful to determine which query terms were matched by each search result.
lucaong
published 6.2.0 •

Changelog

Source

v6.2.0 - 2023-10-26

  • Add the possibility to search for the special value MiniSearch.wildcard to match all documents, but still apply search options like filtering and document boosting
lucaong
published 6.1.0 •

Changelog

Source

v6.1.0 - 2023-05-15

  • Add getStoredFields method to retrieve the stored fields for a document given its ID.

    • Pass stored fields to the boostDocument callback function, making it easier to perform dynamic document boosting.
lucaong
published 6.0.1 •

Changelog

Source

v6.0.1 - 2023-02-01

  • [fix] The 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.
    • [fix] When using search with a QuerySpec, the combineWith option is now properly taking its default from the SearchOptions given as the second argument.
lucaong
published 6.0.0 •

Changelog

Source

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:

  • [breaking change] 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.
  • Add 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.
  • Add discardAll and replace methods, built on top of discard
  • Add vacuuming of references to discarded documents from the index. Vacuuming is performed automatically by default when the number of discarded documents reaches a threshold (controlled by the new 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.
  • Add termCount property, giving the number of distinct terms present in the index
  • Allow customizing the parameters of the BM25+ scoring algorithm via the bm25 search option.
  • Improve TypeScript type of some methods by marking the given array argument as readonly, signaling that it won't be mutated, and allowing passing readonly arrays.
  • Make it possible to overload the loadJS static method in subclasses
lucaong
published 6.0.0-beta.1 •

23
9
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc