Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src-tauri/src/search/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,17 @@ async fn query_coco_fusion_multi_query_sources(
}
}

/*
* Temporary patch
*
* Extensions should have a higher weight than query results.
*/
for (query_source, hits) in all_hits_grouped_by_query_source.iter_mut() {
if query_source.r#type == LOCAL_QUERY_SOURCE_TYPE && query_source.id == "extensions" {
hits.iter_mut().for_each(|hit| hit.score = hit.score * 1.5);
}
}

/*
* Sort hits within each source by score (descending) in case data sources
* do not sort them
Expand Down