Skip to content

Commit

Permalink
feat: sort by score (most relevant first) when searching (#671)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsaul authored Dec 15, 2020
1 parent 19dccee commit 1936a0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/content/lib/query-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ class QueryBuilder {
}
}

this.query = this.query.find({ $fts })
this.query = this.query.find({ $fts }).sortByScoring()

return this
}

Expand Down

0 comments on commit 1936a0e

Please sign in to comment.