Prefer categories with the query string visible in results
ClosedPublic

Authored by broulik on Aug 2 2019, 7:39 AM.

Details

Summary

This logic was present in the old model and keeps e.g. Baloo file search results from getting higher priority than likely more useful application results with the given name. It only affects the order of categories, e.g. scoring "Applications" higher than "Documents" if such a match exists. The order of matches within a category is untouched and remains determined by the runner based on type and relevance.
Since the "relevance" of a QueryMatch is global and determined freely by the runners which don't know what other results might already be present, we have to resort to some fuzzy logic like this.

Test Plan

Searched for "quassel", got quassel application higher rated than my random sprint note file found by Baloo to contain the word quassel.

Diff Detail

Repository
R112 Milou
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Aug 2 2019, 7:39 AM
Restricted Application added a project: Plasma. · View Herald TranscriptAug 2 2019, 7:39 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Aug 2 2019, 7:39 AM
mart accepted this revision.Aug 6 2019, 1:27 PM
This revision is now accepted and ready to land.Aug 6 2019, 1:27 PM
This revision was automatically updated to reflect the committed changes.