From 0b77b6652daff0bd91a6c4215a7aa5da0962ecca Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Sun, 2 Jun 2019 23:44:36 +0300 Subject: Only create the CompoundName when needed, and do it once. --- container-search/src/main/java/com/yahoo/search/Query.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'container-search') 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 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 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 { -- cgit v1.2.3