Reduce popularity boost in search results (#11481)

This commit is contained in:
Tom Moor authored and GitHub committed 2026-02-17 18:51:46 -05:00
1 parent 924db0a3fd
commit 6695ae1f3e
1 file changed
+2 -2
+2 -2
View File
@@ -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",
]);