From 9434accfb324a02d0db5f1830a059ec9fff74f02 Mon Sep 17 00:00:00 2001 From: Thomas Wilkerling Date: Fri, 22 Feb 2019 10:09:04 +0100 Subject: [PATCH] Update Readme --- README.md | 9 +++++--- dist/flexsearch.compact.js | 6 +++--- dist/flexsearch.es5.js | 8 +++---- dist/flexsearch.min.js | 26 +++++++++++----------- dist/flexsearch.node.js | 44 +++++++++++++++++++------------------- flexsearch.js | 2 ++ 6 files changed, 50 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index dc52f71..afc1b7f 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@

Web's fastest and most memory-flexible full-text search library with zero dependencies.

-When it comes to raw search speed FlexSearch outperforms every single searching library out there and also provides flexible search capabilities like multi-field search, phonetic transformations or partial matching. -Depending on the used options it also provides the most memory-efficient index. Keep in mind that updating __existing__ items or removing items from the index has a significant cost. When existing items of your index needs to be updated/removed continuously then BulkSearch may be a better choice. +It is time for a quantum leap in full-text searching algorithms. When it comes to raw search speed FlexSearch outperforms every single searching library out there and also provides flexible search capabilities like multi-field search, phonetic transformations or partial matching. +Depending on the used options it also provides the most memory-efficient index. FlexSearch introduce a new scoring algorithm called "contextual index" based on a high-performance pre-scored lexical dictionary architecture which actually performs queries up to 100,000 times faster than Apache Lucene. FlexSearch also provides you a non-blocking asynchronous processing model as well as web workers to perform any updates or queries on the index in parallel through dedicated balanced threads. FlexSearch Server is available here: https://github.com/nextapps-de/flexsearch-server. @@ -416,9 +416,10 @@ FlexSearch introduce a new scoring mechanism called __Contextual Search__ which The basic idea of this concept is to limit relevance by its context instead of calculating relevance through the whole (unlimited) distance. In this way contextual search also improves the results of relevance-based queries on a large amount of text data. +

@@ -536,6 +537,8 @@ The complexity for one single term is always 1. --> +Keep in mind that updating __existing__ items or removing items from the index has a significant cost. When existing items of your index needs to be updated/removed continuously then BulkSearch may be a better choice. + ## Installation diff --git a/dist/flexsearch.compact.js b/dist/flexsearch.compact.js index a58fa20..506f41c 100644 --- a/dist/flexsearch.compact.js +++ b/dist/flexsearch.compact.js @@ -11,9 +11,9 @@ function P(b,a,c,d,f,m,g,h){if(a[c])return a[c];f=f?(h-(g||h/1.5))*m+(g||h/1.5)* "o"===d||"u"===d||"y"===d,("a"===c||"e"===c||"i"===c||"o"===c||"u"===c||"y"===c)&&d||" "===c)a+=m}else a+=m;d=f===b.length-1?"":b[f+1];c=m}return a}function da(b,a){b=b.length-a.length;return 0>b?1:b?-1:0}function ca(b,a){b=b[y];a=a[y];return ba?1:0}function ba(b,a){const c=y.length;for(let d=0;da?1:0}function I(b,a,c){return b?{page:b,next:a?""+a:null,result:c}:c}function V(b,a,c,d,f,m,g){let h,p=[],e;const n=b.length;!0===c?(c="0",e=""):e=c&&c.split(":"); if(1a?1:a?-1:0}function qa(a,b){a=a[D];b=b[D];return ab?1:0}function ra(a,b){for(var c=D.length,h=0;hb?1:0}function G(a,b,c){return a?{page:a,next:b?""+b:null,result:c}:c}function ha(a,b,c,h,l,e,d){var w=[],g=a.length;if(!0===c){c="0";var f=""}else f=c&&c.split(":");if(1a?1:a?-1:0}function ha(a,b){a=a[E];b=b[E];return ab?1:0}function fa(a, b){const c=E.length;for(let d=0;db?1:0}function L(a,b,c){return a?{page:a,next:b?""+b:null,result:c}:c}function Y(a,b,c,d,e,g,f){let r,q=[],n;const p=a.length;!0===c?(c="0",n=""):n=c&&c.split(":");if(1=this.m.length&&(this.C=0),this.m[this.C].postMessage({add:!0,id:a,content:b}),this.c[g]=""+this.C,c&&c(),this;if(!e){if(this.async&&"function"!==typeof importScripts){let e=this;g=new Promise(function(c){setTimeout(function(){e.add(a,b,null,d,!0);e=null;c()})});if(c)g.then(c);else return g;return this}if(c)return this.add(a,b,null,d,!0),c(),this}b= -this.encode(b);if(!b.length)return this;c=this.f;e=J(c)?c(b):b.split(this.split);this.filter&&(e=P(e,this.filter));const m=u();m._ctx=u();const k=e.length,h=this.threshold,l=this.depth,v=this.b,A=this.j,Q=this.D;for(let b=0;bp;c--)n=f.substring(p,c),T(A,m,n,a,b,q,h,v-1)}break;default:if(r=T(A,m,f,a,1,q,h,v-1),l&&1=h)for(r=m._ctx[f]||(m._ctx[f]=u()),f=this.i[f]||(this.i[f]=Z(v-(h||0))),q=b-l,n=b+l+1,0>q&&(q=0),n>k&&(n=k);q=this.m.length&&(this.C=0),this.m[this.C].postMessage({add:!0,id:a,content:b}),this.c[g]=""+this.C,c&&c(),this;if(!e){if(this.async&&"function"!==typeof importScripts){let e=this;g=new Promise(function(c){setTimeout(function(){e.add(a,b,null,d,!0);e=null;c()})});if(c)g.then(c);else return g;return this}if(c)return this.add(a,b,null,d,!0), +c(),this}b=this.encode(b);if(!b.length)return this;c=this.f;e=J(c)?c(b):b.split(this.split);this.filter&&(e=P(e,this.filter));const m=u();m._ctx=u();const k=e.length,h=this.threshold,l=this.depth,v=this.b,A=this.j,Q=this.D;for(let b=0;bp;c--)n=f.substring(p,c),T(A,m,n,a,b,q,h,v-1)}break;default:if(r=T(A,m,f,a,1,q,h,v-1),l&&1=h)for(r=m._ctx[f]||(m._ctx[f]=u()),f=this.i[f]||(this.i[f]=Z(v-(h||0))),q=b-l,n=b+l+1,0>q&&(q=0),n>k&&(n=k);q=f&&(b=b[r-(e+.5>>0)],b=b[c]||(b[c]=[]),b[b.length]=d);return e}function T(b,a){if(b){const c=Object.keys(b);for(let d=0,e=c.length;db?1:b?-1:0}function ca(b,a){b=b[x];a=a[x];return ba?1:0}function ba(b,a){const c=x.length;for(let d=0;da?1:0}function M(b,a,c){return b?{page:b,next:a?""+a:null,result:c}:c}function V(b,a,c,d,e,g,f){let r,q=[],l;const n=b.length; -!0===c?(c="0",l=""):l=c&&c.split(":");if(1b?1:b?-1:0}function ca(b,a){b=b[x];a=a[x];return ba?1:0}function ba(b,a){const c=x.length;for(let d=0;da?1:0}function M(b,a,c){return b?{page:b,next:a?""+a:null,result:c}:c}function V(b,a,c,d,e,g,f){let r,q=[],l;const p=b.length; +!0===c?(c="0",l=""):l=c&&c.split(":");if(1n;c--)l=f.substring(n,c),Q(A,k,l,b,a,q,h,m-1)}break;default:if(r=Q(A,k,f,b,1,q,h,m-1),t&&1=h)for(r=k._ctx[f]||(k._ctx[f]=v()),f=this.h[f]||(this.h[f]=W(m-(h||0))),q=a-t,l=a+t+1,0>q&&(q=0),l>p&&(l=p);qp;c--)l=f.substring(p,c),Q(A,k,l,b,a,q,h,n-1)}break;default:if(r=Q(A,k,f,b,1,q,h,n-1),t&&1=h)for(r=k._ctx[f]||(k._ctx[f]=v()),f=this.h[f]||(this.h[f]=W(n-(h||0))),q=a-t,l=a+t+1,0>q&&(q=0),l>m&&(l=m);qc;d--)e=f[d-1],f[d]=e,b[e]=d;f[c]=a;b[a]=c}}}return b};return b}();return m}(!1),this); +delete this.count[a];delete this.index[a]}this.index[a]=c;this.l[c]=a;this.count[a]=-1;this.cache[a]=b;this.get(a)}else this.cache[a]=b};b.prototype.get=function(a){const b=this.cache[a];if(this.A&&b){var d=++this.count[a];const b=this.index;let c=b[a];if(0c;d--)e=f[d-1],f[d]=e,b[e]=d;f[c]=a;b[a]=c}}}return b};return b}();return n}(!1),this); diff --git a/flexsearch.js b/flexsearch.js index 5c36c8e..213c665 100644 --- a/flexsearch.js +++ b/flexsearch.js @@ -3508,6 +3508,8 @@ } } } + + i = 0; } } }