Comparing version 2.1.5 to 2.1.6
# Changelog | ||
## 2.1.6 | ||
* Improve pipeline performance for large fields [#329](https://github.com/olivernn/lunr.js/pull/329), thanks [andymcm](https://github.com/andymcm). | ||
## 2.1.5 | ||
@@ -4,0 +8,0 @@ |
@@ -206,10 +206,19 @@ /*! | ||
var fn = this._stack[i] | ||
var memo = [] | ||
tokens = tokens.reduce(function (memo, token, j) { | ||
var result = fn(token, j, tokens) | ||
for (var j = 0; j < tokens.length; j++) { | ||
var result = fn(tokens[j], j, tokens) | ||
if (result === void 0 || result === '') return memo | ||
if (result === void 0 || result === '') continue | ||
return memo.concat(result) | ||
}, []) | ||
if (result instanceof Array) { | ||
for (var k = 0; k < result.length; k++) { | ||
memo.push(result[k]) | ||
} | ||
} else { | ||
memo.push(result) | ||
} | ||
} | ||
tokens = memo | ||
} | ||
@@ -216,0 +225,0 @@ |
{ | ||
"name": "lunr", | ||
"description": "Simple full-text search in your browser.", | ||
"version": "2.1.5", | ||
"version": "2.1.6", | ||
"author": "Oliver Nightingale", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
623398
84
18959