From 65190a02569bef23f3c0d3383e4c333f640ef292 Mon Sep 17 00:00:00 2001 From: Jon Bratseth Date: Sun, 4 Dec 2016 15:29:32 -0800 Subject: Towards always typed, fully specified tensors - Tensor addresses do not repeat dimensions. - Tensor addresses must provide a value for all dimensions. - Tensor dimensions are not serialized in JSON (but still are in binary). - Tensor types are required everywhere, except a workaround for JSON deserialization. - Tensor operations are about 50% faster. - Tensor join of two tensors in the same space is about 4000% faster. --- .../search/query/profile/types/test/QueryProfileTypeTestCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'container-search/src/test/java/com/yahoo/search/query/profile/types') diff --git a/container-search/src/test/java/com/yahoo/search/query/profile/types/test/QueryProfileTypeTestCase.java b/container-search/src/test/java/com/yahoo/search/query/profile/types/test/QueryProfileTypeTestCase.java index d9dfc733f04..dce3cfe0d67 100644 --- a/container-search/src/test/java/com/yahoo/search/query/profile/types/test/QueryProfileTypeTestCase.java +++ b/container-search/src/test/java/com/yahoo/search/query/profile/types/test/QueryProfileTypeTestCase.java @@ -101,7 +101,7 @@ public class QueryProfileTypeTestCase extends junit.framework.TestCase { profile.set("myDouble",2.18, registry); profile.set("myBoolean",true, registry); - String tensorString1 = "{{a:a1, b:b1}:1.0, {a:a2}:2.0}}"; + String tensorString1 = "{{a:a1, b:b1}:1.0, {a:a2, b:b1}:2.0}}"; profile.set("ranking.features.query(myTensor1)", tensorString1, registry); String tensorString2 = "{{x:0, y:0}:1.0, {x:0, y:1}:2.0}}"; profile.set("ranking.features.query(myTensor2)", tensorString2, registry); @@ -388,7 +388,7 @@ public class QueryProfileTypeTestCase extends junit.framework.TestCase { registry.register(profile); CompiledQueryProfileRegistry cRegistry = registry.compile(); - String tensorString = "{{a:a1, b:b1}:1.0, {a:a2}:2.0}}"; + String tensorString = "{{a:a1, b:b1}:1.0, {a:a2, b:b1}:2.0}}"; Query query = new Query(HttpRequest.createTestRequest("?" + encode("ranking.features.query(myTensor1)") + "=" + encode(tensorString), com.yahoo.jdisc.http.HttpRequest.Method.GET), cRegistry.getComponent("test")); -- cgit v1.2.3