mirror of
https://github.com/outline/outline.git
synced 2026-12-02 01:34:47 +03:00
Reduce popularity boost in search results (#11481)
This commit is contained in:
1 parent
924db0a3fd
commit
6695ae1f3e
1 file changed
+2
-2
@@ -510,10 +510,10 @@ export default class SearchHelper {
|
||||
|
||||
if (query) {
|
||||
// Combine text relevance with logarithmic popularity boost
|
||||
// Popular documents get a boost, but text relevance remains primary
|
||||
// Popular documents get a small boost, but text relevance remains primary
|
||||
attributes.push([
|
||||
Sequelize.literal(
|
||||
`ts_rank("searchVector", to_tsquery('english', :query)) * (1 + LN(1 + COALESCE("popularityScore", 0)))`
|
||||
`ts_rank("searchVector", to_tsquery('english', :query)) * (1 + 0.25 * LN(1 + COALESCE("popularityScore", 0)))`
|
||||
),
|
||||
"searchRanking",
|
||||
]);
|
||||
|
||||
Reference in new issue
Block a user