diff options
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/query/profile/types/FieldType.java')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/query/profile/types/FieldType.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/query/profile/types/FieldType.java b/container-search/src/main/java/com/yahoo/search/query/profile/types/FieldType.java index 69c07843681..3bfd33668e6 100644 --- a/container-search/src/main/java/com/yahoo/search/query/profile/types/FieldType.java +++ b/container-search/src/main/java/com/yahoo/search/query/profile/types/FieldType.java @@ -6,6 +6,7 @@ import com.yahoo.search.query.profile.QueryProfileRegistry; import com.yahoo.search.query.profile.compiled.CompiledQueryProfileRegistry; import com.yahoo.search.yql.YqlQuery; import com.yahoo.tensor.Tensor; +import com.yahoo.tensor.TensorType; /** * Superclass of query type field types. @@ -43,6 +44,12 @@ public abstract class FieldType { public abstract Object convertFrom(Object o, CompiledQueryProfileRegistry registry); /** + * Returns this type as a tensor type: The true tensor type is this is a tensor field an an empty type - + * interpreted as a double in numerical contexts - otherwise + */ + public TensorType asTensorType() { return TensorType.empty; } + + /** * Returns the field type for a given string name. * * @param typeString a type string - a primitive name, "query-profile" or "query-profile:profile-name" |