Skip to content

Commit

Permalink
fix: Add score > 0 condition for search (#102)
Browse files Browse the repository at this point in the history
Add score > 0
  • Loading branch information
aadarsh-ram authored Oct 10, 2022
1 parent 17150d9 commit 23b9b5e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/editor/entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,18 +251,22 @@ def full_text_search(text):
CALL {
CALL db.index.fulltext.queryNodes("nodeSearchIds", $text_id_query_fuzzy)
yield node, score as score_
where score_ > 0
return node, score_ * 3 as score
UNION
CALL db.index.fulltext.queryNodes("nodeSearchTags", $text_query_fuzzy)
yield node, score as score_
where score_ > 0
return node, score_ * 5 as score
UNION
CALL db.index.fulltext.queryNodes("nodeSearchIds", $text_id_query_exact)
yield node, score as score_
where score_ > 0
return node, score_ as score
UNION
CALL db.index.fulltext.queryNodes("nodeSearchTags", $text_query_exact)
yield node, score as score_
where score_ > 0
return node, score_ as score
}
with node.id as node, score
Expand Down

0 comments on commit 23b9b5e

Please sign in to comment.