Skip to content

Commit 11f58c0

Browse files
authored
fix: show all root items in suggestions (#1804)
When no query is set we should still see items with zero visits. Frecency should only decide ranking and not filtering in this scenario.
1 parent 8cf5993 commit 11f58c0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/server/src/services/root-item-manager/root-item-manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ double RootItemManager::SearchableRootItem::frecency() const {
138138
}
139139

140140
double RootItemManager::SearchableRootItem::fuzzyScore(const fuzzy::Query &query) const {
141-
if (query.empty()) return 100.0 * frecency();
141+
if (query.empty()) return 100.0 - fuzzy::FRECENCY_WEIGHT + fuzzy::FRECENCY_WEIGHT * frecency();
142142

143143
using WS = fzf::WeightedString;
144144
std::string alias = meta->alias.value_or("");

0 commit comments

Comments
 (0)