Skip to content

Commit 8e15871

Browse files
committed
fix: NOT bug, re naming, 27/27 tests passing
1 parent 93afdd8 commit 8e15871

File tree

5 files changed

+491
-272
lines changed

5 files changed

+491
-272
lines changed

src/search.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ export function buildSearch(query: query): any {
2121
}
2222
if (!!NOTS) {
2323
NOTS = aql`${ANDS || ORS ? aql.literal(' AND ') : undefined}
24-
${NOTS.phrs ? aql.literal(' NOT ') : undefined} ${NOTS.phrs}
25-
${NOTS.phrs && NOTS.tokens ? aql.literal(' AND ') : undefined} ${NOTS.tokens}`
24+
${NOTS.phrases ? aql.literal(' NOT ') : undefined} ${NOTS.phrases}
25+
${NOTS.phrases && NOTS.tokens ? aql.literal(' AND ') : undefined} ${NOTS.tokens}`
2626
}
2727

2828
/* if an empty query.terms string or array is passed, SEARCH true, bringing
@@ -68,7 +68,6 @@ function buildPhrase(phrase: term, collections: collection[], key: string): any
6868
return aql`PHRASE(doc.${key}, ${phrase.val.slice(1, -1)}, ${coll.analyzer})`
6969
})
7070
return aql`(${aql.join(phrases, ' OR ')})`
71-
7271
}
7372

7473
function buildTokens(tokens: term[], collections: collection[], key: string): any {

0 commit comments

Comments
 (0)