Create whitelist for the most popular settings

As a temporary solution to getting the most popular
settings to be the top rank, we have created a white list.
If a prioritized setting shows up somewhere in the results
then it will be given an elevated rank to be at the top.

Bug: 35048659
Test: make RunSettingsRoboTests
Change-Id: I92b563a17b42d8f91d980dd1d8e5f8f29ca5aa9c
This commit is contained in:
Matthew Fritze
2017-02-14 13:57:08 -08:00
parent bdaf7572d9
commit b759516cbf
7 changed files with 322 additions and 14 deletions

View File

@@ -27,10 +27,15 @@ import java.util.Objects;
public class SearchResult implements Comparable<SearchResult> {
/**
* Defines the max rank for a search result to be considered as ranked. Results with ranks
* Defines the lowest rank for a search result to be considered as ranked. Results with ranks
* higher than this have no guarantee for sorting order.
*/
public static final int MAX_RANK = 10;
public static final int BOTTOM_RANK = 10;
/**
* Defines the highest rank for a search result. Used for special search results only.
*/
public static final int TOP_RANK = 0;
/**
* The title of the result and main text displayed.