minisearch
Advanced tools
Comparing version 7.0.2 to 7.1.0
@@ -5,2 +5,7 @@ # Changelog | ||
## v7.1.0 | ||
- Add `boostTerm` search option to apply a custom boosting factor to specific | ||
terms in the query | ||
## v7.0.2 | ||
@@ -7,0 +12,0 @@ |
@@ -280,2 +280,14 @@ type LeafType = '' & { | ||
/** | ||
* Function to calculate a boost factor for each term. | ||
* | ||
* This function, if provided, is called for each query term (as split by | ||
* `tokenize` and processed by `processTerm`). The arguments passed to the | ||
* function are the query term, the positional index of the term in the query, | ||
* and the array of all query terms. It is expected to return a numeric boost | ||
* factor for the term. A factor lower than 1 reduces the importance of the | ||
* term, a factor greater than 1 increases it. A factor of exactly 1 is | ||
* neutral, and does not affect the term's importance. | ||
*/ | ||
boostTerm?: (term: string, i: number, terms: string[]) => number; | ||
/** | ||
* Relative weights to assign to prefix search results and fuzzy search | ||
@@ -282,0 +294,0 @@ * results. Exact matches are assigned a weight of 1. |
{ | ||
"name": "minisearch", | ||
"version": "7.0.2", | ||
"version": "7.1.0", | ||
"description": "Tiny but powerful full-text search engine for browser and Node", | ||
@@ -5,0 +5,0 @@ "main": "dist/umd/index.js", |
@@ -88,3 +88,3 @@ # MiniSearch | ||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/minisearch@7.0.2/dist/umd/index.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/minisearch@7.1.0/dist/umd/index.min.js"></script> | ||
``` | ||
@@ -91,0 +91,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
902288
13898