aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/query/profile/types
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2022-02-07 23:21:36 +0100
committerGitHub <noreply@github.com>2022-02-07 23:21:36 +0100
commit154c8837f1ca166816d289db82fed90baca72e54 (patch)
treeb529a22e0b28e4f95e5398d1246deeb53798ee69 /container-search/src/main/java/com/yahoo/search/query/profile/types
parenta2b99d544beca9fdb8ae6a2d3b180536e07a7c61 (diff)
Revert "Bratseth/presentation format tensors"
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/query/profile/types')
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/profile/types/FieldDescription.java4
1 files changed, 3 insertions, 1 deletions
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<FieldDescription> {
/**
* 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<FieldDescription> {
* @param overridable whether this can be overridden when first set in a profile. Default: true
*/
public FieldDescription(CompoundName name, FieldType type, List<String> aliases, boolean mandatory, boolean overridable) {
+ if (name.isEmpty())
+ throw new IllegalArgumentException("Illegal name ''");
for (String nameComponent : name.asList())
QueryProfile.validateName(nameComponent);
this.name = name;