diff options
Diffstat (limited to 'config-model/src/main/java/com/yahoo/searchdefinition/derived/AttributeFields.java')
-rw-r--r-- | config-model/src/main/java/com/yahoo/searchdefinition/derived/AttributeFields.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/AttributeFields.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/AttributeFields.java index 55f3a94bb70..a3580a404a3 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/AttributeFields.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/AttributeFields.java @@ -41,8 +41,11 @@ public class AttributeFields extends Derived implements AttributesConfig.Produce /** Whether this has any position attribute */ private boolean hasPosition = false; + public static final AttributeFields empty = new AttributeFields(null); + public AttributeFields(Search search) { - derive(search); + if (search != null) + derive(search); } /** Derives everything from a field */ |