1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-09-30 15:18:57 +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

@@ -1,7 +1,7 @@
import Resolver from "../resolver.js";
import default_resolver from "./default.js";
import { create_object, get_max_len } from "../common.js";
import { union as _union } from "../intersect.js";
import { ResolverOptions } from "../type.js";
Resolver.prototype.or = function () {
@@ -23,31 +23,6 @@ Resolver.prototype.or = function () {
}
}
// for(let i = 0; i < args.length; i++){
// if(args[i].result instanceof Promise){
// return;
// }
// }
// if(args.length < 2){
// if(first_argument.index){
// first_argument.resolve = false;
// const result = first_argument.index.search(first_argument);
// if(result instanceof Promise){
// result.then(function(result){
// final = self.result.concat(result);
// self.result = resolver(final, limit, offset, enrich, !resolve);
// return resolve ? self.result : self;
// });
// }
// else{
// final = this.result.concat(result);
// this.result = resolver(final, limit, offset, enrich, !resolve);
// return resolve ? this.result : this;
// }
// }
// }
let final = [],
promises = [],
limit = 0,
@@ -57,7 +32,10 @@ Resolver.prototype.or = function () {
for (let i = 0, query; i < args.length; i++) {
if (query = args[i]) {
query = /** @type {string|ResolverOptions} */args[i];
if (query) {
limit = query.limit || 0;
offset = query.offset || 0;