aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/schema/RankProfile.java
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2022-05-03 20:25:15 +0200
committerJon Bratseth <bratseth@gmail.com>2022-05-03 20:25:15 +0200
commit840e1572b6e6d44384e61dab60b1b33f1d52260d (patch)
treeedff126e54644de96ad1e2c12c6d7191fcd4edad /container-search/src/main/java/com/yahoo/search/schema/RankProfile.java
parent3ae5c8ae0b25b8619f97ca28fecde3c0ec510ebe (diff)
Revert "Merge pull request #22428 from vespa-engine/revert-22426-bratseth/schema-info-5"
This reverts commit d6cb1273bcebdea6b8404b242cecb81802d0fb60, reversing changes made to de8e6f7128dc6489800eae8ce8cdcc6e3414475e.
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/schema/RankProfile.java')
-rw-r--r--container-search/src/main/java/com/yahoo/search/schema/RankProfile.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/schema/RankProfile.java b/container-search/src/main/java/com/yahoo/search/schema/RankProfile.java
index 8267e5c937b..39d4a389e6f 100644
--- a/container-search/src/main/java/com/yahoo/search/schema/RankProfile.java
+++ b/container-search/src/main/java/com/yahoo/search/schema/RankProfile.java
@@ -3,7 +3,9 @@ package com.yahoo.search.schema;
import com.yahoo.tensor.TensorType;
+import java.util.Collections;
import java.util.HashMap;
+import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Objects;
@@ -23,7 +25,7 @@ public class RankProfile {
this.name = builder.name;
this.hasSummaryFeatures = builder.hasSummaryFeatures;
this.hasRankFeatures = builder.hasRankFeatures;
- this.inputs = Map.copyOf(builder.inputs);
+ this.inputs = Collections.unmodifiableMap(builder.inputs);
}
public String name() { return name; }
@@ -64,7 +66,7 @@ public class RankProfile {
private final String name;
private boolean hasSummaryFeatures = true;
private boolean hasRankFeatures = true;
- private final Map<String, TensorType> inputs = new HashMap<>();
+ private final Map<String, TensorType> inputs = new LinkedHashMap<>();
public Builder(String name) {
this.name = Objects.requireNonNull(name);