diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-02-21 14:07:35 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@oath.com> | 2018-02-21 14:07:35 +0100 |
commit | f5a796313c118d62614d170f31286556ef6bb367 (patch) | |
tree | f5165fd69ecfb3d7b85848c2316738ecbe67be16 /config-model/src/main/java/com/yahoo/searchdefinition/RankProfileRegistry.java | |
parent | 96d16478b29443c420ff64acc8e5ff90271c5951 (diff) |
Add types of includes fields
Diffstat (limited to 'config-model/src/main/java/com/yahoo/searchdefinition/RankProfileRegistry.java')
-rw-r--r-- | config-model/src/main/java/com/yahoo/searchdefinition/RankProfileRegistry.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/RankProfileRegistry.java b/config-model/src/main/java/com/yahoo/searchdefinition/RankProfileRegistry.java index a075b9d00fa..7b4d70d85b1 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/RankProfileRegistry.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/RankProfileRegistry.java @@ -16,8 +16,7 @@ import java.util.Set; * Having both of these mappings consolidated here make it easier to remove dependencies on these mappings at * run time, since it is essentially only used when building rank profile config at deployment time. * - * TODO: Reconsider the difference between local and global maps. Right now, the local maps might better be - * served from a different class owned by SearchBuilder. + * TODO: Rank profiles should be stored under its owning Search instance. * * @author Ulf Lilleengen */ @@ -31,9 +30,6 @@ public class RankProfileRegistry { /* These rank profiles can be overridden: 'default' rank profile, as that is documented to work. And 'unranked'. */ static final Set<String> overridableRankProfileNames = new HashSet<>(Arrays.asList("default", "unranked")); - public RankProfileRegistry() { - } - public static RankProfileRegistry createRankProfileRegistryWithBuiltinRankProfiles(Search search) { RankProfileRegistry rankProfileRegistry = new RankProfileRegistry(); rankProfileRegistry.addRankProfile(new DefaultRankProfile(search, rankProfileRegistry)); @@ -47,7 +43,7 @@ public class RankProfileRegistry { * @param rankProfile the rank profile to add */ public void addRankProfile(RankProfile rankProfile) { - if (!rankProfiles.containsKey(rankProfile.getSearch())) { + if ( ! rankProfiles.containsKey(rankProfile.getSearch())) { rankProfiles.put(rankProfile.getSearch(), new LinkedHashMap<>()); } checkForDuplicateRankProfile(rankProfile); |