=f&&(c.o=c.c),c.B&&c.o===c.c&&(c.cache&&c.i.set(b,c.h),c.B(c.h),c.h=[]),c})}else a.worker=!1,this.j=null;this.b=a.tokenize||d.b||this.b||v.b;this.async=y(b=a.async)?this.async||v.async:
-b;this.c=y(b=a.worker)?this.c||v.c:b;this.threshold=y(b=a.threshold)?d.threshold||this.threshold||v.threshold:b;this.depth=y(b=a.depth)?d.depth||this.depth||v.depth:b;this.u=y(b=a.suggest)?this.u||v.u:b;this.s=(b=y(b=a.encode)?d.encode:b)&&A[b]&&A[b].bind(A)||(C(b)?b:this.s||!1);(b=a.matcher)&&this.addMatcher(b);if(b=a.filter)this.filter=S(N[b]||b,this.s);if(b=a.stemmer)this.stemmer=T(O[b]||b,this.s);this.w=L(10);this.l={};this.a={};this.g={};this.f=[];this.D=0;this.v=!0;this.i=(this.cache=b=y(b=
-a.cache)?this.cache||v.cache:b)?new Z(b):!1;return this};h.prototype.encode=function(a){a&&G.length&&(a=w(a,G));a&&this.C.length&&(a=w(a,this.C));a&&this.s&&(a=this.s(a));a&&this.stemmer&&(a=w(a,this.stemmer));return a};h.prototype.addMatcher=function(a){const b=this.C;for(const d in a)a.hasOwnProperty(d)&&b.push(e(d),a[d]);return this};h.prototype.add=function(a,b,d){if(b&&B(b)&&(a&&!P[a]||0===a))if(this.a[a]&&!d)this.update(a,b);else{if(this.c)return++this.m>=this.j.length&&(this.m=0),this.j[this.m].postMessage(this.m,
-{add:!0,id:a,content:b}),this.a[a]=""+this.m,this;if(this.async)return this.g[a]||(this.f[this.f.length]=a),this.g[a]=[D.add,a,b],F(this),this;b=this.encode(b);if(!b.length)return this;d=this.b;b=C(d)?d(b):"ngram"===d?J(b):b.split(M);const k={_ctx:{}},h=this.threshold,u=this.depth,n=this.w,p=b.length;for(let m=0;ml;d--)g=c.substring(l,d),x(n,k,g,a,b,e,h)}break;default:if(f=x(n,k,c,a,1,e,h),u&&1
=h)for(f=k._ctx[c]||(k._ctx[c]={}),c=this.l[c]||(this.l[c]=L(10)),e=m-u,g=m+u+1,0>e&&(e=0),g>p&&(g=p);eb;b++)r(this.w[b],a);this.depth&&r(this.l,a);delete this.a[a];this.v=!1}return this};h.prototype.search=function(a,b,d,c){let f=a,e;var g=[];"object"===typeof a&&((d=a.callback||b)&&(f.callback=null),b=a.limit,e=a.threshold,a=a.query);e||(e=this.threshold||0);C(b)?(d=b,b=1E3):b||0===b||(b=1E3);if(this.c)for(this.B=
-d,this.o=0,this.h=[],g=0;g=e;f--){var t=(n?m[p]:this.w)[f];if(t=t[b])c[d++]=t,a=!0}if(a)q[q.length]=1d;c--)e=f[c-1],f[c]=e,b[e]=c;f[d]=a;b[a]=d}}}return b};return a}();return h}(function(){const q=Object.create(null),z="undefined"!==typeof Blob&&"undefined"!==typeof URL&&URL.createObjectURL;return function(h,t,e,w,x){let r=h;h=z?URL.createObjectURL(new Blob(["("+e.toString()+")()"],{type:"text/javascript"})):r+".min.js";r+="-"+t;q[r]||(q[r]=[]);q[r][x]=
-new Worker(h);q[r][x].onmessage=w;return{postMessage:function(e,h){q[r][e].postMessage(h)}}}}()),this);
+'use strict';(function(r,A,g){let v;(v=g.define)&&v.amd?v([],function(){return A}):(v=g.modules)?v[r.toLowerCase()]=A:"object"===typeof exports?module.exports=A:g[r]=A})("FlexSearch",function P(r){function g(a){C(a)&&(a=I[a]);a||(a=w);this.id=a.id||Q++;this.init(a);v(this,"index",function(){return this.a});v(this,"length",function(){return Object.keys(this.a).length})}function v(a,b,d){Object.defineProperty(a,b,{get:d})}function e(a){return new RegExp(a,"g")}function x(a,b){for(let d=0;d=h&&(a=a[f+.5>>0],a=a[d]||(a[d]=[]),a[a.length]=c);return f}function p(a,b){if(a){const d=Object.keys(a);for(let c=0,f=d.length;ca?1:a?-1:0}function V(a,b){a=a.length-b.length;return 0>a?-1:a?1:0}function W(a,b,d){let c=[],f=[];const l=a.length;if(1b&&(c=c.slice(0,b)));return c}function C(a){return"string"===typeof a}function D(a){return"function"===typeof a}function z(a){return"undefined"===typeof a}function G(a){a.D||(a.D=K(function(){a.D=0;{const b=a.async;let d;b&&(a.async=!1);if(a.f.length){const b=Date.now();let f;for(;(f=a.f.shift())||0===f;){d=a.g[f];switch(d[0]){case E.add:a.add(d[1],d[2]);break;case E.remove:a.remove(d[1])}delete a.g[f];
+if(100=f&&(c.o=c.c),c.B&&c.o===c.c&&(c.cache&&c.i.set(b,c.h),c.B(c.h),c.h=[]),c})}else a.worker=!1,this.j=null;this.b=a.tokenize||d.b||this.b||w.b;this.async=z(b=a.async)?this.async||w.async:b;this.c=z(b=a.worker)?this.c||w.c:b;this.threshold=z(b=a.threshold)?d.threshold||this.threshold||w.threshold:b;this.depth=z(b=a.depth)?d.depth||this.depth||w.depth:b;this.u=z(b=a.suggest)?this.u||w.u:b;this.s=(b=z(b=a.encode)?d.encode:b)&&B[b]&&B[b].bind(B)||
+(D(b)?b:this.s||!1);(b=a.matcher)&&this.addMatcher(b);if(b=a.filter)this.filter=S(N[b]||b,this.s);if(b=a.stemmer)this.stemmer=T(O[b]||b,this.s);this.w=L(10);this.l=q();this.a=q();this.g=q();this.f=[];this.D=0;this.v=!0;this.i=(this.cache=b=z(b=a.cache)?this.cache||w.cache:b)?new Y(b):!1;return this};g.prototype.encode=function(a){a&&H.length&&(a=x(a,H));a&&this.C.length&&(a=x(a,this.C));a&&this.s&&(a=this.s(a));a&&this.stemmer&&(a=x(a,this.stemmer));return a};g.prototype.addMatcher=function(a){const b=
+this.C;for(const d in a)a.hasOwnProperty(d)&&b.push(e(d),a[d]);return this};g.prototype.add=function(a,b,d){if(b&&C(b)&&(a||0===a))if(this.a[a]&&!d)this.update(a,b);else{if(this.c)return++this.m>=this.j.length&&(this.m=0),this.j[this.m].postMessage(this.m,{add:!0,id:a,content:b}),this.a[a]=""+this.m,this;if(this.async)return this.g[a]||(this.f[this.f.length]=a),this.g[a]=[E.add,a,b],G(this),this;b=this.encode(b);if(!b.length)return this;d=this.b;b=D(d)?d(b):b.split(M);const l=q();l._ctx=q();const u=
+this.threshold,t=this.depth,n=this.w,m=b.length;for(let k=0;kg;d--)h=c.substring(g,d),y(n,l,h,a,b,e,u)}break;default:if(f=y(n,l,c,a,1,e,u),t&&1=u)for(f=l._ctx[c]||(l._ctx[c]=q()),c=this.l[c]||(this.l[c]=L(10)),e=k-t,h=k+t+
+1,0>e&&(e=0),h>m&&(h=m);eb;b++)p(this.w[b],a);this.depth&&p(this.l,a);
+delete this.a[a];this.v=!1}return this};g.prototype.search=function(a,b,d,c){let f=a,e;var h=[];"object"===typeof a&&((d=a.callback||b)&&(f.callback=null),b=a.limit,e=a.threshold,a=a.query);e||(e=this.threshold||0);D(b)?(d=b,b=1E3):b||0===b||(b=1E3);if(this.c)for(this.B=d,this.o=0,this.h=[],h=0;h=e;h--)if(f=m[h][b])a[d++]=f,c=!0}if(c)r[r.length]=1d;c--)f=e[c-1],e[c]=f,b[f]=c;e[d]=a;b[a]=d}}}return b};return a}();return g}(function(){const r={},
+A="undefined"!==typeof Blob&&"undefined"!==typeof URL&&URL.createObjectURL;return function(g,v,e,x,y){let p=g;g=A?URL.createObjectURL(new Blob(["("+e.toString()+")()"],{type:"text/javascript"})):p+".min.js";p+="-"+v;r[p]||(r[p]=[]);r[p][y]=new Worker(g);r[p][y].onmessage=x;return{postMessage:function(e,g){r[p][e].postMessage(g)}}}}()),this);
diff --git a/package.json b/package.json
index 5153c9b..4e92d51 100644
--- a/package.json
+++ b/package.json
@@ -1,16 +1,17 @@
{
"name": "flexsearch",
- "version": "0.3.21",
+ "version": "0.3.3",
"description": "Next-Generation full text search library with zero dependencies.",
"homepage": "https://github.com/nextapps-de/flexsearch/",
"author": "Thomas Wilkerling",
"copyright": "Nextapps GmbH",
"license": "Apache-2.0",
"keywords": [
- "full text search",
+ "fulltext search",
"elastic search",
"fastest search",
- "contextual search"
+ "contextual search",
+ "fuzzy search"
],
"bugs": {
"url": "https://github.com/nextapps-de/flexsearch/issues",
diff --git a/test/benchmark-presets.html b/test/benchmark-presets.html
new file mode 100644
index 0000000..2789045
--- /dev/null
+++ b/test/benchmark-presets.html
@@ -0,0 +1,287 @@
+
+
+
+
+ Benchmark Presets
+
+
+
+Presets Benchmark Comparison
+
+Indexed Text: "Gulliver's Travels" (Swift Jonathan 1726)
+
+
+
+
+
+
+
+
diff --git a/test/benchmark.html b/test/benchmark.html
index eb18067..9dea7a3 100644
--- a/test/benchmark.html
+++ b/test/benchmark.html
@@ -22,7 +22,7 @@ Indexed Text: "Gulliver's Travels" (Swift Jonathan 1726)
-Test rules: 1. no cache allowed, 2. no async allowed, 3. should return at least 7 entries for the query "Gulliver".
+Test rules: 1. no cache allowed, 2. no async allowed, 3. should return at least 7 matches for the query "gulliver", 4. result should be ordered by relevance
@@ -62,9 +62,9 @@ Indexed Text: "Gulliver's Travels" (Swift Jonathan 1726)
flexsearch = new FlexSearch({
encode: "icase",
- mode: "strict",
+ tokenize: "strict",
threshold: 9,
- depth: 0,
+ depth: 1,
async: false,
cache: false,
worker: false
@@ -88,7 +88,7 @@ Indexed Text: "Gulliver's Travels" (Swift Jonathan 1726)
flexsearch_cache = new FlexSearch({
encode: "icase",
- mode: "strict",
+ tokenize: "strict",
threshold: 9,
depth: 1,
async: false,
@@ -115,7 +115,7 @@ Indexed Text: "Gulliver's Travels" (Swift Jonathan 1726)
flexsearch_cache_scale = new FlexSearch({
encode: "icase",
- mode: "strict",
+ tokenize: "strict",
threshold: 9,
depth: 1,
async: false,
@@ -142,7 +142,7 @@ Indexed Text: "Gulliver's Travels" (Swift Jonathan 1726)
flexsearch_worker = new FlexSearch({
encode: "icase",
- mode: "strict",
+ tokenize: "strict",
threshold: 9,
depth: 1,
async: true,
@@ -233,21 +233,17 @@ Indexed Text: "Gulliver's Travels" (Swift Jonathan 1726)
init: function(){
- // wadesearch = function(query){
- // return wade(query)/*.sort(sort_by_score_down)*/;
- // };
- //
- // function sort_by_score_down(a, b){
- // var sum = a.score - b.score;
- // return sum < 0 ? 1 : sum > 0 ? -1 : 0;
- // }
-
wade = Wade(text_data.slice(0));
},
+ sort: function(a, b){
+
+ var sum = a.score - b.score;
+ return sum < 0 ? 1 : sum ? -1 : 0;
+ },
add: function(index, content){},
query: function(query){
- return wade(query)/*.map(function(val){return val.index})*/;
+ return wade(query).sort(this.sort)/*.map(function(val){return val.index})*/;
},
loops: 1500
},
@@ -266,12 +262,9 @@ Indexed Text: "Gulliver's Travels" (Swift Jonathan 1726)
keys: ["content"],
id: "id",
shouldSort: true,
- threshold: 0.6,
- location: 0,
- distance: 100,
- findAllMatches: true,
- maxPatternLength: 32,
- minMatchCharLength: 1
+ tokenize: true,
+ matchAllTokens: true,
+ threshold: 0.2
});
},
add: function(index, content){},
@@ -350,8 +343,10 @@ Indexed Text: "Gulliver's Travels" (Swift Jonathan 1726)
var html = "" +
"" +
- "Library | " +
- "Benchmark | " +
+ "Library | " +
+ "Benchmark (Single Phrase) | " +
+ "Benchmark (Multi Phrase) | " +
+ "Benchmark (Mixed Not Found) | " +
"
";
for(var test in tests){
@@ -361,6 +356,8 @@ Indexed Text: "Gulliver's Travels" (Swift Jonathan 1726)
html += "" +
"" + test + " | " +
"indexing ... | " +
+ " | " +
+ " | " +
"
"
}
}
@@ -412,44 +409,57 @@ Indexed Text: "Gulliver's Travels" (Swift Jonathan 1726)
setTimeout(function(){
- start_tests(0, keys);
+ start_tests(0, 0, keys);
}, 1000);
}
}
- function start_tests(index, keys){
+ var text_queries_notfound = [
- var queries = text_queries;
+ "undefined1 undefined2 undefined3",
+ "undefined"
+ ];
+
+ function start_tests(suite, index, keys){
+
+ var queries = suite === 0 ? text_queries : (suite === 1 ? text_queries_multi : text_queries_notfound);
var len = queries.length;
var key = keys[index];
var test = tests[key];
var loops = test.loops;
var query = test.query;
-
var start = Date.now();
for(var i = 0; i < len; i++){
- var tmp = queries[i];
+ var phrase = queries[i];
for(var x = 0; x < loops; x++){
- query(tmp);
+ query(phrase);
}
}
var duration = Date.now() - start;
- console.log(key + ":", duration);
+ console.log("[Suite " + suite + "] " + key + ":", duration);
- document.getElementById("test-" + key).textContent = /*format_number*/(((1000 / duration * loops * 10 + 0.5) >> 0) / 10) + " op/s";
+ document.getElementById("test-" + (suite === 1 ? "multi-" : (suite === 2 ? "notfound-" : "")) + key).textContent = format_number(((1000 / duration * loops * 10 + 0.5) >> 0) / 10) + " op/s";
- if(++index < keys.length){
+ if(++index >= keys.length){
+
+ if(++suite < 3){
+
+ index = 0;
+ }
+ }
+
+ if(index < keys.length){
setTimeout(function(){
- start_tests(index, keys);
+ start_tests(suite, index, keys);
}, 1000);
}
@@ -470,7 +480,7 @@ Indexed Text: "Gulliver's Travels" (Swift Jonathan 1726)
// ---------------------------------------
- //window.tests = tests;
+ window.tests = tests;
})();
diff --git a/test/flexsearch.es5.js b/test/flexsearch.es5.js
index 68522b8..c4a7222 100644
--- a/test/flexsearch.es5.js
+++ b/test/flexsearch.es5.js
@@ -1,36 +1,36 @@
/*
- FlexSearch v0.3.21
+ FlexSearch v0.3.3
Copyright 2019 Nextapps GmbH
Author: Thomas Wilkerling
Released under the Apache 2.0 Licence
https://github.com/nextapps-de/flexsearch
*/
-'use strict';function J(g){var h=0;return function(){return h=e&&(b=b[A+.5>>0],b=b[a]||(b[a]=[]),b[b.length]=f);return A}function m(b,c){if(b)for(var a=Object.keys(b),f=0,A=a.length;f=(8=(8b?1:b?-1:0}function X(b,c){b=b.length-c.length;return 0>b?-1:b?1:0}function Y(b,c,a){var f=[],d=[],e=b.length;if(1c&&(f=f.slice(0,c)));return f}function E(b){return"string"===typeof b}function H(b){return"function"===typeof b}function x(b){return"undefined"===typeof b}function B(b){b.F||(b.F=
-M(function(){b.F=0;var c=b.async;c&&(b.async=!1);if(b.b.length){for(var a=Date.now(),f;(f=b.b.shift())||0===f;){var d=b.c[f];switch(d[0]){case C.add:b.add(d[1],d[2]);break;case C.remove:b.remove(d[1])}delete b.c[f];if(100=d&&(f.o=f.i),f.C&&f.o===f.i&&(f.cache&&f.g.set(c,f.f),f.C(f.f),f.f=[]),f})}else b.worker=!1,this.j=null;this.h=b.tokenize||a.h||this.h||w.h;this.async=x(c=b.async)?this.async||w.async:c;this.i=x(c=b.worker)?this.i||w.i:c;this.threshold=x(c=b.threshold)?a.threshold||
-this.threshold||w.threshold:c;this.depth=x(c=b.depth)?a.depth||this.depth||w.depth:c;this.w=x(c=b.suggest)?this.w||w.w:c;this.s=(c=x(c=b.encode)?a.encode:c)&&y[c]&&y[c].bind(y)||(H(c)?c:this.s||!1);(c=b.matcher)&&this.addMatcher(c);if(c=b.filter)this.filter=V(P[c]||c,this.s);if(c=b.stemmer)this.stemmer=Z(Q[c]||c,this.s);this.v=N(10);this.l={};this.a={};this.c={};this.b=[];this.F=0;this.u=!0;this.g=(this.cache=c=x(c=b.cache)?this.cache||w.cache:c)?new da(c):!1;return this};e.prototype.encode=function(b){b&&
-F.length&&(b=l(b,F));b&&this.D.length&&(b=l(b,this.D));b&&this.s&&(b=this.s(b));b&&this.stemmer&&(b=l(b,this.stemmer));return b};e.prototype.addMatcher=function(b){var c=this.D,d;for(d in b)b.hasOwnProperty(d)&&c.push(a(d),b[d]);return this};e.prototype.add=function(b,c,a){if(c&&E(c)&&(b&&!R[b]||0===b))if(this.a[b]&&!a)this.update(b,c);else{if(this.i)return++this.m>=this.j.length&&(this.m=0),this.j[this.m].postMessage(this.m,{add:!0,id:b,content:c}),this.a[b]=""+this.m,this;if(this.async)return this.c[b]||
-(this.b[this.b.length]=b),this.c[b]=[C.add,b,c],B(this),this;c=this.encode(c);if(!c.length)return this;a=this.h;c=H(a)?a(c):"ngram"===a?D(c):c.split(O);for(var f={_ctx:{}},e=this.threshold,g=this.depth,k=this.v,r=c.length,t=0;tu;v--)q=
-l.substring(u,v),d(k,f,q,b,m,p,e);break;default:if(n=d(k,f,l,b,1,p,e),g&&1=e)for(n=f._ctx[l]||(f._ctx[l]={}),l=this.l[l]||(this.l[l]=N(10)),p=t-g,q=t+g+1,0>p&&(p=0),q>r&&(q=r);pc;c++)m(this.v[c],b);this.depth&&m(this.l,b);delete this.a[b];this.u=!1}return this};e.prototype.search=function(b,c,a,f){var d=b,e=[];if("object"===typeof b){(a=b.callback||c)&&(d.callback=null);c=b.limit;var g=b.threshold;b=b.query}g||(g=this.threshold||0);H(c)?(a=c,c=1E3):c||0===c||(c=1E3);if(this.i)for(this.C=a,this.o=0,this.f=[],e=0;e=g;I--)if(G=(m?w[v]:this.v)[I],G=G[y])B[F++]=G,C=!0;if(C)p[p.length]=1
-e;c--)k=g[c-1],g[c]=k,d[k]=c;g[e]=a;d[a]=e}}}return b};return a}();return e}(function(){var g=Object.create(null),h="undefined"!==typeof Blob&&"undefined"!==typeof URL&&URL.createObjectURL;return function(e,k,a,l,d){var m=e;e=h?URL.createObjectURL(new Blob(["("+a.toString()+")()"],{type:"text/javascript"})):m+".es5.js";m+="-"+k;g[m]||(g[m]=[]);g[m][d]=new Worker(e);g[m][d].onmessage=l;return{postMessage:function(a,d){g[m][a].postMessage(d)}}}}()),this);
+'use strict';function H(g){var h=0;return function(){return h=e&&(b=b[d+.5>>0],b=b[a]||(b[a]=[]),b[b.length]=f);return d}function m(b,c){if(b)for(var a=Object.keys(b),f=0,d=a.length;fb?1:b?-1:0}function U(b,c){b=b.length-
+c.length;return 0>b?-1:b?1:0}function V(b,c,a){var f=[],d=[],e=b.length;if(1c&&(f=f.slice(0,c)));return f}function F(b){return"string"===typeof b}function C(b){return"function"===typeof b}function y(b){return"undefined"===typeof b}function D(b){b.F||(b.F=L(function(){b.F=0;var c=b.async;c&&(b.async=!1);if(b.b.length){for(var a=Date.now(),f;(f=b.b.shift())||0===f;){var d=b.c[f];switch(d[0]){case B.add:b.add(d[1],d[2]);break;case B.remove:b.remove(d[1])}delete b.c[f];if(100=d&&(f.o=f.i),f.C&&f.o===f.i&&(f.cache&&f.g.set(c,f.f),f.C(f.f),
+f.f=[]),f})}else b.worker=!1,this.j=null;this.h=b.tokenize||a.h||this.h||x.h;this.async=y(c=b.async)?this.async||x.async:c;this.i=y(c=b.worker)?this.i||x.i:c;this.threshold=y(c=b.threshold)?a.threshold||this.threshold||x.threshold:c;this.depth=y(c=b.depth)?a.depth||this.depth||x.depth:c;this.w=y(c=b.suggest)?this.w||x.w:c;this.s=(c=y(c=b.encode)?a.encode:c)&&A[c]&&A[c].bind(A)||(C(c)?c:this.s||!1);(c=b.matcher)&&this.addMatcher(c);if(c=b.filter)this.filter=z(O[c]||c,this.s);if(c=b.stemmer)this.stemmer=
+T(P[c]||c,this.s);this.v=M(10);this.l=w();this.a=w();this.c=w();this.b=[];this.F=0;this.u=!0;this.g=(this.cache=c=y(c=b.cache)?this.cache||x.cache:c)?new aa(c):!1;return this};e.prototype.encode=function(b){b&&E.length&&(b=l(b,E));b&&this.D.length&&(b=l(b,this.D));b&&this.s&&(b=this.s(b));b&&this.stemmer&&(b=l(b,this.stemmer));return b};e.prototype.addMatcher=function(b){var c=this.D,d;for(d in b)b.hasOwnProperty(d)&&c.push(a(d),b[d]);return this};e.prototype.add=function(b,c,a){if(c&&F(c)&&(b||0===
+b))if(this.a[b]&&!a)this.update(b,c);else{if(this.i)return++this.m>=this.j.length&&(this.m=0),this.j[this.m].postMessage(this.m,{add:!0,id:b,content:c}),this.a[b]=""+this.m,this;if(this.async)return this.c[b]||(this.b[this.b.length]=b),this.c[b]=[B.add,b,c],D(this),this;c=this.encode(c);if(!c.length)return this;a=this.h;c=C(a)?a(c):c.split(N);var f=w();f._ctx=w();for(var e=this.threshold,g=this.depth,k=this.v,r=c.length,u=0;uv;t--)q=l.substring(v,t),d(k,f,q,b,m,p,e);break;default:if(n=d(k,f,l,b,1,p,e),g&&1=e)for(n=f._ctx[l]||(f._ctx[l]=w()),l=this.l[l]||(this.l[l]=M(10)),p=u-g,q=u+g+1,0>p&&(p=0),q>r&&(q=r);pc;c++)m(this.v[c],b);this.depth&&m(this.l,b);delete this.a[b];this.u=!1}return this};e.prototype.search=function(b,c,a,d){var f=b,e=[];if("object"===typeof b){(a=b.callback||c)&&(f.callback=null);c=b.limit;var g=b.threshold;
+b=b.query}g||(g=this.threshold||0);C(c)?(a=c,c=1E3):c||0===c||(c=1E3);if(this.i)for(this.C=a,this.o=0,this.f=[],e=0;e=g;G--)if(E=t[G][z])A[D++]=E,B=!0;if(B)p[p.length]=1e;c--)k=g[c-1],g[c]=k,d[k]=c;g[e]=a;d[a]=e}}}return b};return a}();return e}(function(){var g={},h="undefined"!==typeof Blob&&"undefined"!==typeof URL&&URL.createObjectURL;return function(e,k,a,l,d){var m=e;e=h?URL.createObjectURL(new Blob(["("+a.toString()+")()"],{type:"text/javascript"})):m+".es5.js";m+="-"+k;g[m]||(g[m]=[]);g[m][d]=new Worker(e);
+g[m][d].onmessage=l;return{postMessage:function(a,d){g[m][a].postMessage(d)}}}}()),this);
diff --git a/test/matching-flexsearch.html b/test/matching-flexsearch.html
deleted file mode 100644
index bfffcc6..0000000
--- a/test/matching-flexsearch.html
+++ /dev/null
@@ -1,327 +0,0 @@
-
-
-
-
- Matching Test
-
-
-
-
-Relevance Scoring Comparison
-Indexed Text: "Gulliver's Travels" (Swift Jonathan 1726)
-
-
-
-
-
- Query |
- default |
- memory |
- speed |
- matching |
- scoring |
- balanced |
- fastest |
-
-
- "without breach of modesty" |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
-
-
- "went softly stream" |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
-
-
- "princes of the ambition" |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
-
-
- "five-thousand leagues" |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
-
-
- "i already observed" |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
-
-
- "let a of his" |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
-
-
- "take that to the rocks" |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
-
-
- "bignes of splaknuk" |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
-
-
- "matematikal musikal instruments" |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
-
-
- "matical sical strument" |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
-
-
- "lalkon the camberlayhn" |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
- wait ... |
-
-
-
-
-Red: No results.
-Yellow: Most relevant result is not on top.
-Green: Most relevant result was successfully found on top.
-Note: Open console and type e.g. data[493]
-
-
-
diff --git a/test/matching-presets.html b/test/matching-presets.html
new file mode 100644
index 0000000..570ace2
--- /dev/null
+++ b/test/matching-presets.html
@@ -0,0 +1,339 @@
+
+
+
+
+ Presets Matching Test
+
+
+
+Presets Relevance Scoring Comparison
+Indexed Text: "Gulliver's Travels" (Swift Jonathan 1726)
+
+
+
+
+
+
+ Query |
+ default |
+ memory |
+ speed |
+ matching |
+ scoring |
+ balanced |
+ fastest |
+
+
+ "without breach of modesty" |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+
+
+ "went softly stream" |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+
+
+ "princes of the ambition" |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+
+
+ "five-thousand leagues" |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+
+
+ "i already observed" |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+
+
+ "let a of his" |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+
+
+ "take that to the rocks" |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+
+
+ "bignes of splaknuk" |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+
+
+ "matematikal musikal instruments" |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+
+
+ "matical sical strument" |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+
+
+ "lalkon the camberlayhn" |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+ wait ... |
+
+
+
+
+
+
Either no results or relevant content was not included in results.
+
Most relevant results was not found in the first place.
+
Most relevant results was successfully found in the first place.
+
Note: Open console and type e.g.
data[493]
+
+
+
+
diff --git a/test/matching.html b/test/matching.html
index 90bf3cf..344c36c 100644
--- a/test/matching.html
+++ b/test/matching.html
@@ -3,16 +3,6 @@
Matching Test
-
-
-
-
-
-
-
-
-
-