diff options
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/query/profile/ModelObjectMap.java')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/query/profile/ModelObjectMap.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/query/profile/ModelObjectMap.java b/container-search/src/main/java/com/yahoo/search/query/profile/ModelObjectMap.java index 059df807724..4dc9ade62e5 100644 --- a/container-search/src/main/java/com/yahoo/search/query/profile/ModelObjectMap.java +++ b/container-search/src/main/java/com/yahoo/search/query/profile/ModelObjectMap.java @@ -16,11 +16,14 @@ import com.yahoo.search.query.properties.PropertyMap; */ public class ModelObjectMap extends PropertyMap { - /** Returns true if the class of the value is not acceptable as a query profile value */ + /** + * Returns true if the class of the value is *not* acceptable as a query profile value, + * and therefore should be set in this. + */ @Override - protected boolean shouldSet(CompoundName name,Object value) { - if (value==null) return true; - return FieldType.fromClass(value.getClass())==null; + protected boolean shouldSet(CompoundName name, Object value) { + if (value == null) return true; + return ! FieldType.isLegalFieldValue(value); } } |