diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-02-05 13:20:28 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@oath.com> | 2018-02-05 13:20:28 +0100 |
commit | ff42200912e298bb8d4f29da8d18c8b0079b04b7 (patch) | |
tree | 12fb6fd3f49489b462eaa94244be9c3d9a956755 /container-search/src/main/java/com/yahoo/search/query/profile/types/FieldType.java | |
parent | 595d685af6fe641cf735278925f73a570e441ab5 (diff) |
Use all query profiles and handle conflicts
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" |