diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-06-02 23:44:36 +0300 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2019-06-02 23:44:36 +0300 |
commit | 0b77b6652daff0bd91a6c4215a7aa5da0962ecca (patch) | |
tree | ab9fc3c12cb344e995966f0c9877bafe80f486dd /container-search | |
parent | 9ff9c4f20bd4b5440ece8f879de35dff7de12102 (diff) |
Only create the CompoundName when needed, and do it once.
Diffstat (limited to 'container-search')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/Query.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/Query.java b/container-search/src/main/java/com/yahoo/search/Query.java index 82dac06c424..9d7d3952a01 100644 --- a/container-search/src/main/java/com/yahoo/search/Query.java +++ b/container-search/src/main/java/com/yahoo/search/Query.java @@ -401,8 +401,9 @@ public class Query extends com.yahoo.processing.Request implements Cloneable { private void setFrom(String prefix, Properties originalProperties, QueryProfileType arguments, Map<String, String> context) { prefix = prefix + getPrefix(arguments); for (FieldDescription field : arguments.fields().values()) { - String fullName = prefix + field.getName(); + if (field.getType() == FieldType.genericQueryProfileType) { // Generic map + CompoundName fullName = new CompoundName(prefix + field.getName()); for (Map.Entry<String, Object> entry : originalProperties.listProperties(fullName, context).entrySet()) { try { properties().set(fullName + "." + entry.getKey(), entry.getValue(), context); @@ -415,6 +416,7 @@ public class Query extends com.yahoo.processing.Request implements Cloneable { setFrom(prefix, originalProperties, ((QueryProfileFieldType)field.getType()).getQueryProfileType(), context); } else { + CompoundName fullName = new CompoundName(prefix + field.getName()); Object value = originalProperties.get(fullName, context); if (value != null) { try { |