diff options
author | Geir Storli <geirst@verizonmedia.com> | 2020-06-15 12:34:58 +0000 |
---|---|---|
committer | Geir Storli <geirst@verizonmedia.com> | 2020-06-15 12:34:58 +0000 |
commit | b17ee23a6fd3c81ffc5ca8505b74ac922a6f6165 (patch) | |
tree | 94beed5a591d67901373c0e704634eb64cb568cb /searchcore/src/tests/proton | |
parent | f0ce676f7de72f90cd5919c33d2fa3fb6ec76c4f (diff) |
Remove default tensor spec in doctype builder.
Diffstat (limited to 'searchcore/src/tests/proton')
-rw-r--r-- | searchcore/src/tests/proton/docsummary/docsummary.cpp | 9 | ||||
-rw-r--r-- | searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/searchcore/src/tests/proton/docsummary/docsummary.cpp b/searchcore/src/tests/proton/docsummary/docsummary.cpp index e1785e1e48d..b6d6d2437d8 100644 --- a/searchcore/src/tests/proton/docsummary/docsummary.cpp +++ b/searchcore/src/tests/proton/docsummary/docsummary.cpp @@ -662,10 +662,11 @@ void addField(Schema & s, const std::string &name, Schema::DataType dtype, - Schema::CollectionType ctype) + Schema::CollectionType ctype, + const std::string& tensor_spec = "") { - s.addSummaryField(Schema::SummaryField(name, dtype, ctype)); - s.addAttributeField(Schema::AttributeField(name, dtype, ctype)); + s.addSummaryField(Schema::SummaryField(name, dtype, ctype, tensor_spec)); + s.addAttributeField(Schema::AttributeField(name, dtype, ctype, tensor_spec)); } @@ -682,7 +683,7 @@ Test::requireThatAttributesAreUsed() addField(s, "bg", schema::DataType::INT32, CollectionType::WEIGHTEDSET); addField(s, "bh", schema::DataType::FLOAT, CollectionType::WEIGHTEDSET); addField(s, "bi", schema::DataType::STRING, CollectionType::WEIGHTEDSET); - addField(s, "bj", schema::DataType::TENSOR, CollectionType::SINGLE); + addField(s, "bj", schema::DataType::TENSOR, CollectionType::SINGLE, "tensor(x{},y{})"); BuildContext bc(s); DBContext dc(bc._repo, getDocTypeName()); diff --git a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp index 18235116d27..d1d08a332e3 100644 --- a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp +++ b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp @@ -285,8 +285,8 @@ SchemaContext::SchemaContext() : schema(new Schema()), builder() { - schema->addAttributeField(Schema::AttributeField("tensor", DataType::TENSOR, CollectionType::SINGLE)); - schema->addAttributeField(Schema::AttributeField("tensor2", DataType::TENSOR, CollectionType::SINGLE)); + schema->addAttributeField(Schema::AttributeField("tensor", DataType::TENSOR, CollectionType::SINGLE, "tensor(x{},y{})")); + schema->addAttributeField(Schema::AttributeField("tensor2", DataType::TENSOR, CollectionType::SINGLE, "tensor(x{},y{})")); addField("i1"); } |