diff options
author | Jon Bratseth <bratseth@yahoo-inc.com> | 2016-12-04 15:29:32 -0800 |
---|---|---|
committer | Jon Bratseth <bratseth@yahoo-inc.com> | 2016-12-04 15:29:32 -0800 |
commit | 65190a02569bef23f3c0d3383e4c333f640ef292 (patch) | |
tree | c48a11e88141ba1eee7f732fcda27bf97642de27 /container-search/src/test | |
parent | ee6783f2201988e22ef91d1f354255599c8c0165 (diff) |
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.
Diffstat (limited to 'container-search/src/test')
-rw-r--r-- | container-search/src/test/java/com/yahoo/search/query/profile/types/test/QueryProfileTypeTestCase.java | 4 |
1 files changed, 2 insertions, 2 deletions
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")); |