From 755f1ffbf89de0c37fe605282721e03bb5f0e407 Mon Sep 17 00:00:00 2001 From: Thomas Wilkerling Date: Mon, 3 Oct 2022 14:45:52 +0200 Subject: [PATCH] fix issue #238 --- src/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 54d520a..e76cab5 100644 --- a/src/index.js +++ b/src/index.js @@ -165,7 +165,7 @@ Index.prototype.add = function(id, content, _append, _skip_update){ case "full": - if(term_length > 3){ + if(term_length > 2){ for(let x = 0; x < term_length; x++){ @@ -183,13 +183,13 @@ Index.prototype.add = function(id, content, _append, _skip_update){ break; } - // fallthrough to next case when term length < 4 + // fallthrough to next case when term length < 3 case "reverse": // skip last round (this token exist already in "forward") - if(term_length > 2){ + if(term_length > 1){ for(let x = term_length - 1; x > 0; x--){