summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/docsummary
diff options
context:
space:
mode:
Diffstat (limited to 'searchcore/src/tests/proton/docsummary')
-rw-r--r--searchcore/src/tests/proton/docsummary/docsummary.cpp17
-rw-r--r--searchcore/src/tests/proton/docsummary/summary.cfg33
2 files changed, 49 insertions, 1 deletions
diff --git a/searchcore/src/tests/proton/docsummary/docsummary.cpp b/searchcore/src/tests/proton/docsummary/docsummary.cpp
index 93e8f3d248b..b034b77086c 100644
--- a/searchcore/src/tests/proton/docsummary/docsummary.cpp
+++ b/searchcore/src/tests/proton/docsummary/docsummary.cpp
@@ -35,6 +35,7 @@
#include <vespa/searchlib/tensor/tensor_attribute.h>
#include <vespa/searchlib/transactionlog/nosyncproxy.h>
#include <vespa/searchlib/transactionlog/translogserver.h>
+#include <vespa/searchsummary/docsummary/i_docsum_field_writer_factory.h>
#include <vespa/searchsummary/docsummary/i_docsum_store_document.h>
#include <vespa/searchsummary/docsummary/summaryfieldconverter.h>
#include <vespa/vespalib/data/simple_buffer.h>
@@ -77,6 +78,19 @@ using namespace vespalib::slime;
namespace proton {
+class MockDocsumFieldWriterFactory : public search::docsummary::IDocsumFieldWriterFactory
+{
+public:
+ std::unique_ptr<DocsumFieldWriter> create_docsum_field_writer(const vespalib::string& fieldName, const vespalib::string& overrideName, const vespalib::string& argument, bool& rc) override {
+ (void) fieldName;
+ (void) overrideName;
+ (void) argument;
+ (void) rc;
+ return {};
+ }
+
+};
+
class DirMaker
{
public:
@@ -1121,7 +1135,8 @@ Fixture::Fixture()
std::string cfgId("summary");
_summaryCfg = ConfigGetter<vespa::config::search::SummaryConfig>::getConfig(
cfgId, ::config::FileSpec(TEST_PATH("summary.cfg")));
- _resultCfg.ReadConfig(*_summaryCfg, cfgId.c_str());
+ auto docsum_field_writer_factory = std::make_unique<MockDocsumFieldWriterFactory>();
+ _resultCfg.ReadConfig(*_summaryCfg, cfgId.c_str(), *docsum_field_writer_factory);
}
Fixture::~Fixture() = default;
diff --git a/searchcore/src/tests/proton/docsummary/summary.cfg b/searchcore/src/tests/proton/docsummary/summary.cfg
index cceb15c8fd2..33641351c02 100644
--- a/searchcore/src/tests/proton/docsummary/summary.cfg
+++ b/searchcore/src/tests/proton/docsummary/summary.cfg
@@ -61,31 +61,54 @@ classes[2].id 2
classes[2].fields[2]
classes[2].fields[0].name "aa"
classes[2].fields[0].type "integer"
+classes[2].fields[0].command "copy"
+classes[2].fields[0].source "ab"
classes[2].fields[1].name "ab"
classes[2].fields[1].type "integer"
+classes[2].fields[1].command "empty"
classes[3].name "class3"
classes[3].id 3
classes[3].fields[10]
classes[3].fields[0].name "ba"
classes[3].fields[0].type "integer"
+classes[3].fields[0].command "attribute"
+classes[3].fields[0].source "ba"
classes[3].fields[1].name "bb"
classes[3].fields[1].type "float"
+classes[3].fields[1].command "attribute"
+classes[3].fields[1].source "bb"
classes[3].fields[2].name "bc"
classes[3].fields[2].type "longstring"
+classes[3].fields[2].command "attribute"
+classes[3].fields[2].source "bc"
classes[3].fields[3].name "bd"
classes[3].fields[3].type "jsonstring"
+classes[3].fields[3].command "attribute"
+classes[3].fields[3].source "bd"
classes[3].fields[4].name "be"
classes[3].fields[4].type "jsonstring"
+classes[3].fields[4].command "attribute"
+classes[3].fields[4].source "be"
classes[3].fields[5].name "bf"
classes[3].fields[5].type "jsonstring"
+classes[3].fields[5].command "attribute"
+classes[3].fields[5].source "bf"
classes[3].fields[6].name "bg"
classes[3].fields[6].type "jsonstring"
+classes[3].fields[6].command "attribute"
+classes[3].fields[6].source "bg"
classes[3].fields[7].name "bh"
classes[3].fields[7].type "jsonstring"
+classes[3].fields[7].command "attribute"
+classes[3].fields[7].source "bh"
classes[3].fields[8].name "bi"
classes[3].fields[8].type "jsonstring"
+classes[3].fields[8].command "attribute"
+classes[3].fields[8].source "bi"
classes[3].fields[9].name "bj"
classes[3].fields[9].type "tensor"
+classes[3].fields[9].command "attribute"
+classes[3].fields[9].source "bj"
classes[4].name "class4"
classes[4].id 4
classes[4].fields[1]
@@ -98,18 +121,28 @@ classes[5].fields[0].name "sp2"
classes[5].fields[0].type "int64"
classes[5].fields[1].name "sp2x"
classes[5].fields[1].type "xmlstring"
+classes[5].fields[1].command "positions"
+classes[5].fields[1].source "sp2"
classes[5].fields[2].name "ap2"
classes[5].fields[2].type "jsonstring"
classes[5].fields[3].name "ap2x"
classes[5].fields[3].type "xmlstring"
+classes[5].fields[3].command "positions"
+classes[5].fields[3].source "ap2"
classes[5].fields[4].name "wp2"
classes[5].fields[4].type "jsonstring"
classes[5].fields[5].name "wp2x"
classes[5].fields[5].type "xmlstring"
+classes[5].fields[5].command "positions"
+classes[5].fields[5].source "wp2"
classes[6].name "class6"
classes[6].id 6
classes[6].fields[6]
classes[6].fields[0].name "ba"
classes[6].fields[0].type "integer"
+classes[6].fields[0].command "attribute"
+classes[6].fields[0].source "ba"
classes[6].fields[1].name "bb"
classes[6].fields[1].type "float"
+classes[6].fields[1].command "attribute"
+classes[6].fields[1].source "bb"