mirror of
https://github.com/nextapps-de/flexsearch.git
synced 2025-09-24 20:41:28 +02:00
fix default resolver state, fix indexeddb transaction recycling
This commit is contained in:
7
dist/module-debug/db/indexeddb/index.js
vendored
7
dist/module-debug/db/indexeddb/index.js
vendored
@@ -285,19 +285,20 @@ IdxDB.prototype.transaction = function (ref, modifier, task) {
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
transaction.onerror = err => {
|
||||
this.trx[ref + ":" + modifier] = null;
|
||||
transaction.abort();
|
||||
transaction = store = null;
|
||||
reject(err);
|
||||
//db.close;
|
||||
};
|
||||
transaction.oncomplete = res => {
|
||||
this.trx[ref + ":" + modifier] = null;
|
||||
transaction = store = null;
|
||||
resolve(res || !0);
|
||||
//db.close;
|
||||
};
|
||||
return task.call(this, store);
|
||||
const promise = task.call(this, store);
|
||||
//
|
||||
this.trx[ref + ":" + modifier] = null;
|
||||
return promise;
|
||||
});
|
||||
};
|
||||
|
||||
|
4
dist/module-debug/document/search.js
vendored
4
dist/module-debug/document/search.js
vendored
@@ -61,7 +61,7 @@ Document.prototype.search = function (query, limit, options, _promises) {
|
||||
tag,
|
||||
offset,
|
||||
count = 0,
|
||||
resolve,
|
||||
resolve = /* tag? */ /* stringify */ /* stringify */ /* single param */ /* skip update: */ /* append: */ /* skip update: */ /* skip_update: */!0 /*await rows.hasNext()*/ /*await rows.hasNext()*/ /*await rows.hasNext()*/,
|
||||
highlight;
|
||||
|
||||
|
||||
@@ -412,7 +412,7 @@ Document.prototype.search = function (query, limit, options, _promises) {
|
||||
};
|
||||
}
|
||||
|
||||
if (enrich && /* tag? */ /* stringify */ /* stringify */ /* single param */ /* skip update: */ /* append: */ /* skip update: */ /* skip_update: */!0 /*await rows.hasNext()*/ /*await rows.hasNext()*/ /*await rows.hasNext()*/ && this.db && promises.length) {
|
||||
if (enrich && !0 && this.db && promises.length) {
|
||||
const self = this;
|
||||
return Promise.all(promises).then(function (promises) {
|
||||
for (let j = 0; j < promises.length; j++) {
|
||||
|
3
dist/module-debug/index/search.js
vendored
3
dist/module-debug/index/search.js
vendored
@@ -57,7 +57,8 @@ Index.prototype.search = function (query, limit, options) {
|
||||
offset = options.offset || 0;
|
||||
context = options.context;
|
||||
suggest = options.suggest;
|
||||
resolve = /*global_resolve &&*/ /* suggest */ /* append: */ /* enrich */!1 !== options.resolve;
|
||||
resolve = /*global_resolve &&*/ /* suggest */ /* append: */ /* enrich */
|
||||
!1 !== options.resolve;
|
||||
//resolve || (global_resolve = 0);
|
||||
enrich = resolve && options.enrich;
|
||||
boost = options.boost;
|
||||
|
Reference in New Issue
Block a user