From 154c8837f1ca166816d289db82fed90baca72e54 Mon Sep 17 00:00:00 2001 From: Harald Musum Date: Mon, 7 Feb 2022 23:21:36 +0100 Subject: Revert "Bratseth/presentation format tensors" --- .../java/com/yahoo/search/query/profile/types/FieldDescription.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'container-search/src/main/java/com/yahoo/search/query/profile/types') diff --git a/container-search/src/main/java/com/yahoo/search/query/profile/types/FieldDescription.java b/container-search/src/main/java/com/yahoo/search/query/profile/types/FieldDescription.java index a0f38f61672..1d6f584bfaa 100644 --- a/container-search/src/main/java/com/yahoo/search/query/profile/types/FieldDescription.java +++ b/container-search/src/main/java/com/yahoo/search/query/profile/types/FieldDescription.java @@ -81,7 +81,7 @@ public class FieldDescription implements Comparable { /** * Creates a field description * - * @param name the name of the field, empty means it describes the value held by the query profile itself + * @param name the name of the field * @param type the type of the field represented as a string - see {@link com.yahoo.search.query.profile.types.FieldType} * @param aliases a list of aliases, never null. Aliases are not following dotted * (meaning they are global, not that they cannot contain dots) and are case insensitive. @@ -89,6 +89,8 @@ public class FieldDescription implements Comparable { * @param overridable whether this can be overridden when first set in a profile. Default: true */ public FieldDescription(CompoundName name, FieldType type, List aliases, boolean mandatory, boolean overridable) { + if (name.isEmpty()) + throw new IllegalArgumentException("Illegal name ''"); for (String nameComponent : name.asList()) QueryProfile.validateName(nameComponent); this.name = name; -- cgit v1.2.3