From e135dfb02db44621f25e08d36bc8475393e62573 Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Wed, 25 Nov 2020 08:51:49 +0100 Subject: [PATCH] fix: or instead of and for filter search query --- src/structures/structures.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/structures.service.ts b/src/structures/structures.service.ts index 6b37ea7e5..f3a67fda7 100644 --- a/src/structures/structures.service.ts +++ b/src/structures/structures.service.ts @@ -23,7 +23,7 @@ export class StructuresService { } else { query = [{ $text: { $search: searchString } }]; } - return this.structureModel.find({ $and: query }).exec(); + return this.structureModel.find({ $or: query }).exec(); } /** -- GitLab