Skip to content

Commit 2c5d924

Browse files
authored
Merge pull request #2 from HP4k1h5/v0.0.3
V0.0.3
2 parents 1d4544d + 8e15871 commit 2c5d924

File tree

6 files changed

+498
-263
lines changed

6 files changed

+498
-263
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hp4k1h5/aqlquerybuilder.js",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"license": "MIT",
55
"main": "./built/index.d.ts",
66
"scripts": {

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)