1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-09-21 03:01:25 +02:00

hotfix index entry duplication

This commit is contained in:
Thomas Wilkerling
2025-03-14 12:15:49 +01:00
parent a59d26a4d7
commit c2bd70aad5
70 changed files with 11069 additions and 7290 deletions

View File

@@ -271,7 +271,9 @@ H.prototype.add = function(a, c, b, d) {
};
function K(a, c, b, d, e, g, f) {
let h = f ? a.ctx : a.map, k;
c[b] && f && (k = c[b])[f] || (f ? (c = k || (c[b] = u()), c[f] = 1, (k = h.get(f)) ? h = k : h.set(f, h = new Map())) : c[b] = 1, (k = h.get(b)) ? h = k : h.set(b, h = []), h = h[d] || (h[d] = []), g && h.includes(e) || (h.push(e), a.fastupdate && ((c = a.reg.get(e)) ? c.push(h) : a.reg.set(e, [h]))));
if (!c[b] || f && !(k = c[b])[f]) {
f ? (c = k || (c[b] = u()), c[f] = 1, (k = h.get(f)) ? h = k : h.set(f, h = new Map())) : c[b] = 1, (k = h.get(b)) ? h = k : h.set(b, h = []), h = h[d] || (h[d] = []), g && h.includes(e) || (h.push(e), a.fastupdate && ((c = a.reg.get(e)) ? c.push(h) : a.reg.set(e, [h])));
}
}
function J(a, c, b, d, e) {
return b && 1 < a ? c + (d || 0) <= a ? b + (e || 0) : (a - 1) / (c + (d || 0)) * (b + (e || 0)) + 1 | 0 : 0;