From de6053dfa39473db212d438ceefd0f469f1f391a Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Mon, 6 Jan 2020 18:02:11 +0100 Subject: [PATCH] try again, cypress blackbox --- backend/src/schema/resolvers/searches.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/schema/resolvers/searches.js b/backend/src/schema/resolvers/searches.js index ca64ec14b..1005f6576 100644 --- a/backend/src/schema/resolvers/searches.js +++ b/backend/src/schema/resolvers/searches.js @@ -10,9 +10,9 @@ export default { .replace(/\s+/g, ' ') .replace(/[[@#:*~\\$|^\]?/"'(){}+?!,.-]/g, '') .split(' ') - .map(s => '"' + s + '"*') + .map(s => s.toLowerCase().match(/^(not|and|or)$/)? '"' + s + '"' : s + '*') .join(' ') - // console.log(myQuery) + //console.log(myQuery) const postCypher = ` CALL db.index.fulltext.queryNodes('post_fulltext_search', $query) YIELD node as resource, score