lunr 2.3.5 update (#2010)

This commit is contained in:
Justin Rummel 2019-01-01 17:05:06 -05:00 committed by Michael Rose
parent 70c937392d
commit f27bd39a41
2 changed files with 12 additions and 17 deletions

View file

@ -1,5 +1,5 @@
/** /**
* lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.3 * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.5
* Copyright (C) 2018 Oliver Nightingale * Copyright (C) 2018 Oliver Nightingale
* @license MIT * @license MIT
*/ */
@ -54,7 +54,7 @@ var lunr = function (config) {
return builder.build() return builder.build()
} }
lunr.version = "2.3.3" lunr.version = "2.3.5"
/*! /*!
* lunr.utils * lunr.utils
* Copyright (C) 2018 Oliver Nightingale * Copyright (C) 2018 Oliver Nightingale
@ -675,7 +675,7 @@ lunr.Pipeline.prototype.run = function (tokens) {
if (result === void 0 || result === '') continue if (result === void 0 || result === '') continue
if (result instanceof Array) { if (Array.isArray(result)) {
for (var k = 0; k < result.length; k++) { for (var k = 0; k < result.length; k++) {
memo.push(result[k]) memo.push(result[k])
} }
@ -1460,14 +1460,14 @@ lunr.TokenSet.fromFuzzyString = function (str, editDistance) {
if (frame.str.length == 1) { if (frame.str.length == 1) {
noEditNode.final = true noEditNode.final = true
} else { }
stack.push({ stack.push({
node: noEditNode, node: noEditNode,
editsRemaining: frame.editsRemaining, editsRemaining: frame.editsRemaining,
str: frame.str.slice(1) str: frame.str.slice(1)
}) })
} }
}
// deletion // deletion
// can only do a deletion if we have enough edits remaining // can only do a deletion if we have enough edits remaining
@ -2289,7 +2289,7 @@ lunr.Index.load = function (serializedIndex) {
var attrs = {}, var attrs = {},
fieldVectors = {}, fieldVectors = {},
serializedVectors = serializedIndex.fieldVectors, serializedVectors = serializedIndex.fieldVectors,
invertedIndex = {}, invertedIndex = Object.create(null),
serializedInvertedIndex = serializedIndex.invertedIndex, serializedInvertedIndex = serializedIndex.invertedIndex,
tokenSetBuilder = new lunr.TokenSet.Builder, tokenSetBuilder = new lunr.TokenSet.Builder,
pipeline = lunr.Pipeline.load(serializedIndex.pipeline) pipeline = lunr.Pipeline.load(serializedIndex.pipeline)

File diff suppressed because one or more lines are too long