summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@yahooinc.com>2022-10-13 15:30:48 +0200
committerGitHub <noreply@github.com>2022-10-13 15:30:48 +0200
commitd3fefa3ab3db39b713aec3c7cd186c81b468741e (patch)
tree059ddc077a34de0be5b1e43f9e0fd47561e1eeb2 /searchcore
parent3d101c8fa38174fd3a58db1b87c8c33b1badc4ca (diff)
parent5b96704f8cb4982ff17d8ec9071c44a362cf59af (diff)
Merge pull request #24430 from vespa-engine/toregge/rename-empty-doc-builder-to-doc-builder-and-move-it-to-search-test-namespace
Rename search::index::EmptyDocBuilder to search::test::DocBuilder.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_test.cpp76
-rw-r--r--searchcore/src/tests/proton/attribute/document_field_populator/CMakeLists.txt1
-rw-r--r--searchcore/src/tests/proton/attribute/document_field_populator/document_field_populator_test.cpp6
-rw-r--r--searchcore/src/tests/proton/docsummary/docsummary.cpp7
-rw-r--r--searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp9
-rw-r--r--searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp9
-rw-r--r--searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp13
-rw-r--r--searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_common.h10
-rw-r--r--searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_handler_test.cpp2
-rw-r--r--searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_jobtest.cpp2
-rw-r--r--searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_jobtest.h4
-rw-r--r--searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp6
-rw-r--r--searchcore/src/tests/proton/feed_and_search/CMakeLists.txt1
-rw-r--r--searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp12
-rw-r--r--searchcore/src/tests/proton/index/fusionrunner_test.cpp14
-rw-r--r--searchcore/src/tests/proton/index/index_writer/index_writer_test.cpp7
-rw-r--r--searchcore/src/tests/proton/index/indexmanager_test.cpp12
-rw-r--r--searchcore/src/tests/proton/reprocessing/document_reprocessing_handler/CMakeLists.txt1
-rw-r--r--searchcore/src/tests/proton/reprocessing/document_reprocessing_handler/document_reprocessing_handler_test.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/CMakeLists.txt1
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/userdocumentsbuilder.h4
21 files changed, 106 insertions, 97 deletions
diff --git a/searchcore/src/tests/proton/attribute/attribute_test.cpp b/searchcore/src/tests/proton/attribute/attribute_test.cpp
index 78f2d6bbe01..a6e9f8fe7ee 100644
--- a/searchcore/src/tests/proton/attribute/attribute_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_test.cpp
@@ -18,12 +18,12 @@
#include <vespa/searchlib/attribute/interlock.h>
#include <vespa/searchlib/attribute/predicate_attribute.h>
#include <vespa/searchlib/index/dummyfileheadercontext.h>
-#include <vespa/searchlib/index/empty_doc_builder.h>
#include <vespa/searchlib/predicate/predicate_hash.h>
#include <vespa/searchlib/predicate/predicate_index.h>
#include <vespa/searchlib/tensor/dense_tensor_attribute.h>
#include <vespa/searchlib/tensor/tensor_attribute.h>
#include <vespa/searchlib/test/directory_handler.h>
+#include <vespa/searchlib/test/doc_builder.h>
#include <vespa/searchcommon/attribute/attributecontent.h>
#include <vespa/searchcommon/attribute/iattributevector.h>
#include <vespa/searchcommon/attribute/config.h>
@@ -82,13 +82,13 @@ using search::attribute::ImportedAttributeVector;
using search::attribute::ImportedAttributeVectorFactory;
using search::attribute::ReferenceAttribute;
using search::index::DummyFileHeaderContext;
-using search::index::EmptyDocBuilder;
using search::predicate::PredicateHash;
using search::predicate::PredicateIndex;
using search::tensor::DenseTensorAttribute;
using search::tensor::PrepareResult;
using search::tensor::TensorAttribute;
using search::test::DirectoryHandler;
+using search::test::DocBuilder;
using std::string;
using vespalib::ForegroundTaskExecutor;
using vespalib::ForegroundThreadExecutor;
@@ -221,12 +221,12 @@ AttributeWriterTest::~AttributeWriterTest() = default;
TEST_F(AttributeWriterTest, handles_put)
{
- EmptyDocBuilder edb([](auto& header)
- { using namespace document::config_builder;
- header.addField("a1", DataType::T_INT)
- .addField("a2", Array(DataType::T_INT))
- .addField("a3", DataType::T_FLOAT)
- .addField("a4", DataType::T_STRING); });
+ DocBuilder db([](auto& header)
+ { using namespace document::config_builder;
+ header.addField("a1", DataType::T_INT)
+ .addField("a2", Array(DataType::T_INT))
+ .addField("a3", DataType::T_FLOAT)
+ .addField("a4", DataType::T_STRING); });
auto a1 = addAttribute("a1");
auto a2 = addAttribute({"a2", AVConfig(AVBasicType::INT32, AVCollectionType::ARRAY)});
auto a3 = addAttribute({"a3", AVConfig(AVBasicType::FLOAT)});
@@ -238,7 +238,7 @@ TEST_F(AttributeWriterTest, handles_put)
attribute::ConstCharContent sbuf;
{ // empty document should give default values
EXPECT_EQ(1u, a1->getNumDocs());
- put(1, *edb.make_document("id:ns:searchdocument::1"), 1);
+ put(1, *db.make_document("id:ns:searchdocument::1"), 1);
EXPECT_EQ(2u, a1->getNumDocs());
EXPECT_EQ(2u, a2->getNumDocs());
EXPECT_EQ(2u, a3->getNumDocs());
@@ -260,9 +260,9 @@ TEST_F(AttributeWriterTest, handles_put)
EXPECT_EQ(strcmp("", sbuf[0]), 0);
}
{ // document with single value & multi value attribute
- auto doc = edb.make_document("id:ns:searchdocument::2");
+ auto doc = db.make_document("id:ns:searchdocument::2");
doc->setValue("a1", IntFieldValue(10));
- auto int_array = edb.make_array("a2");
+ auto int_array = db.make_array("a2");
int_array.add(IntFieldValue(20));
int_array.add(IntFieldValue(30));
doc->setValue("a2",int_array);
@@ -282,9 +282,9 @@ TEST_F(AttributeWriterTest, handles_put)
EXPECT_EQ(30u, ibuf[1]);
}
{ // replace existing document
- auto doc = edb.make_document("id:ns:searchdocument::2");
+ auto doc = db.make_document("id:ns:searchdocument::2");
doc->setValue("a1", IntFieldValue(100));
- auto int_array = edb.make_array("a2");
+ auto int_array = db.make_array("a2");
int_array.add(IntFieldValue(200));
int_array.add(IntFieldValue(300));
int_array.add(IntFieldValue(400));
@@ -309,7 +309,7 @@ TEST_F(AttributeWriterTest, handles_put)
TEST_F(AttributeWriterTest, handles_predicate_put)
{
- EmptyDocBuilder edb([](auto& header) { header.addField("a1", DataType::T_PREDICATE); });
+ DocBuilder db([](auto& header) { header.addField("a1", DataType::T_PREDICATE); });
auto a1 = addAttribute({"a1", AVConfig(AVBasicType::PREDICATE)});
allocAttributeWriter();
@@ -317,14 +317,14 @@ TEST_F(AttributeWriterTest, handles_predicate_put)
// empty document should give default values
EXPECT_EQ(1u, a1->getNumDocs());
- put(1, *edb.make_document("id:ns:searchdocument::1"), 1);
+ put(1, *db.make_document("id:ns:searchdocument::1"), 1);
EXPECT_EQ(2u, a1->getNumDocs());
EXPECT_EQ(1u, a1->getStatus().getLastSyncToken());
EXPECT_EQ(0u, index.getZeroConstraintDocs().size());
// document with single value attribute
PredicateSlimeBuilder builder;
- auto doc = edb.make_document("id:ns:searchdocument::2");
+ auto doc = db.make_document("id:ns:searchdocument::2");
doc->setValue("a1", PredicateFieldValue(builder.true_predicate().build()));
put(2, *doc, 2);
EXPECT_EQ(3u, a1->getNumDocs());
@@ -335,7 +335,7 @@ TEST_F(AttributeWriterTest, handles_predicate_put)
EXPECT_FALSE(it.valid());
// replace existing document
- doc = edb.make_document("id:ns:searchdocument::2");
+ doc = db.make_document("id:ns:searchdocument::2");
doc->setValue("a1", PredicateFieldValue(builder.feature("foo").value("bar").build()));
put(3, *doc, 2);
EXPECT_EQ(3u, a1->getNumDocs());
@@ -407,10 +407,10 @@ TEST_F(AttributeWriterTest, visibility_delay_is_honoured)
auto a1 = addAttribute({"a1", AVConfig(AVBasicType::STRING)});
allocAttributeWriter();
- EmptyDocBuilder edb([](auto& header) { header.addField("a1", DataType::T_STRING); });
+ DocBuilder db([](auto& header) { header.addField("a1", DataType::T_STRING); });
EXPECT_EQ(1u, a1->getNumDocs());
EXPECT_EQ(0u, a1->getStatus().getLastSyncToken());
- auto doc = edb.make_document("id:ns:searchdocument::1");
+ auto doc = db.make_document("id:ns:searchdocument::1");
doc->setValue("a1", StringFieldValue("10"));
put(3, *doc, 1);
EXPECT_EQ(2u, a1->getNumDocs());
@@ -433,13 +433,13 @@ TEST_F(AttributeWriterTest, visibility_delay_is_honoured)
EXPECT_EQ(8u, a1->getStatus().getLastSyncToken());
verifyAttributeContent(*a1, 2, "10");
- doc = edb.make_document("id:ns:searchdocument::1");
+ doc = db.make_document("id:ns:searchdocument::1");
doc->setValue("a1", StringFieldValue("11"));
awDelayed.put(9, *doc, 2, emptyCallback);
- doc = edb.make_document("id:ns:searchdocument::1");
+ doc = db.make_document("id:ns:searchdocument::1");
doc->setValue("a1", StringFieldValue("20"));
awDelayed.put(10, *doc, 2, emptyCallback);
- doc = edb.make_document("id:ns:searchdocument::1");
+ doc = db.make_document("id:ns:searchdocument::1");
doc->setValue("a1", StringFieldValue("30"));
awDelayed.put(11, *doc, 2, emptyCallback);
EXPECT_EQ(8u, a1->getStatus().getLastSyncToken());
@@ -454,10 +454,10 @@ TEST_F(AttributeWriterTest, handles_predicate_remove)
auto a1 = addAttribute({"a1", AVConfig(AVBasicType::PREDICATE)});
allocAttributeWriter();
- EmptyDocBuilder edb([](auto& header) { header.addField("a1", DataType::T_PREDICATE); });
+ DocBuilder db([](auto& header) { header.addField("a1", DataType::T_PREDICATE); });
PredicateSlimeBuilder builder;
- auto doc = edb.make_document("id:ns:searchdocument::1");
+ auto doc = db.make_document("id:ns:searchdocument::1");
doc->setValue("a1", PredicateFieldValue(builder.true_predicate().build()));
put(1, *doc, 1);
EXPECT_EQ(2u, a1->getNumDocs());
@@ -477,10 +477,10 @@ TEST_F(AttributeWriterTest, handles_update)
fillAttribute(a1, 1, 10, 1);
fillAttribute(a2, 1, 20, 1);
- EmptyDocBuilder edb([](auto& header)
+ DocBuilder db([](auto& header)
{ header.addField("a1", DataType::T_INT)
.addField("a2", DataType::T_INT); });
- DocumentUpdate upd(edb.get_repo(), edb.get_document_type(), DocumentId("id:ns:searchdocument::1"));
+ DocumentUpdate upd(db.get_repo(), db.get_document_type(), DocumentId("id:ns:searchdocument::1"));
upd.addUpdate(FieldUpdate(upd.getType().getField("a1"))
.addUpdate(std::make_unique<ArithmeticValueUpdate>(ArithmeticValueUpdate::Add, 5)));
upd.addUpdate(FieldUpdate(upd.getType().getField("a2"))
@@ -511,14 +511,14 @@ TEST_F(AttributeWriterTest, handles_predicate_update)
{
auto a1 = addAttribute({"a1", AVConfig(AVBasicType::PREDICATE)});
allocAttributeWriter();
- EmptyDocBuilder edb([](auto& header) { header.addField("a1", DataType::T_PREDICATE); });
+ DocBuilder db([](auto& header) { header.addField("a1", DataType::T_PREDICATE); });
PredicateSlimeBuilder builder;
- auto doc = edb.make_document("id:ns:searchdocument::1");
+ auto doc = db.make_document("id:ns:searchdocument::1");
doc->setValue("a1", PredicateFieldValue(builder.true_predicate().build()));
put(1, *doc, 1);
EXPECT_EQ(2u, a1->getNumDocs());
- DocumentUpdate upd(edb.get_repo(), edb.get_document_type(), DocumentId("id:ns:searchdocument::1"));
+ DocumentUpdate upd(db.get_repo(), db.get_document_type(), DocumentId("id:ns:searchdocument::1"));
upd.addUpdate(FieldUpdate(upd.getType().getField("a1"))
.addUpdate(std::make_unique<AssignValueUpdate>(std::make_unique<PredicateFieldValue>(builder.feature("foo").value("bar").build()))));
@@ -662,7 +662,7 @@ createTensorAttribute(AttributeWriterTest &t) {
}
Document::UP
-createTensorPutDoc(EmptyDocBuilder& builder, const Value &tensor) {
+createTensorPutDoc(DocBuilder& builder, const Value &tensor) {
auto doc = builder.make_document("id:ns:searchdocument::1");
TensorFieldValue fv(*doc->getField("a1").getDataType().cast_tensor());
fv = SimpleValue::from_value(tensor);
@@ -676,7 +676,7 @@ TEST_F(AttributeWriterTest, can_write_to_tensor_attribute)
{
auto a1 = createTensorAttribute(*this);
allocAttributeWriter();
- EmptyDocBuilder builder([](auto& header) { header.addTensorField("a1", sparse_tensor); });
+ DocBuilder builder([](auto& header) { header.addTensorField("a1", sparse_tensor); });
auto tensor = make_tensor(TensorSpec(sparse_tensor)
.add({{"x", "4"}, {"y", "5"}}, 7));
Document::UP doc = createTensorPutDoc(builder, *tensor);
@@ -693,7 +693,7 @@ TEST_F(AttributeWriterTest, handles_tensor_assign_update)
{
auto a1 = createTensorAttribute(*this);
allocAttributeWriter();
- EmptyDocBuilder builder([](auto& header) { header.addTensorField("a1", sparse_tensor); });
+ DocBuilder builder([](auto& header) { header.addTensorField("a1", sparse_tensor); });
auto tensor = make_tensor(TensorSpec(sparse_tensor)
.add({{"x", "6"}, {"y", "7"}}, 9));
auto doc = createTensorPutDoc(builder, *tensor);
@@ -746,10 +746,10 @@ putAttributes(AttributeWriterTest &t, std::vector<uint32_t> expExecuteHistory)
vespalib::string a2_name = "a2x";
vespalib::string a3_name = "a3y";
- EmptyDocBuilder edb([&](auto& header)
- { header.addField(a1_name, DataType::T_INT)
- .addField(a2_name, DataType::T_INT)
- .addField(a3_name, DataType::T_INT); });
+ DocBuilder db([&](auto& header)
+ { header.addField(a1_name, DataType::T_INT)
+ .addField(a2_name, DataType::T_INT)
+ .addField(a3_name, DataType::T_INT); });
auto a1 = t.addAttribute(a1_name);
auto a2 = t.addAttribute(a2_name);
@@ -759,7 +759,7 @@ putAttributes(AttributeWriterTest &t, std::vector<uint32_t> expExecuteHistory)
EXPECT_EQ(1u, a1->getNumDocs());
EXPECT_EQ(1u, a2->getNumDocs());
EXPECT_EQ(1u, a3->getNumDocs());
- auto doc = edb.make_document("id:ns:searchdocument::1");
+ auto doc = db.make_document("id:ns:searchdocument::1");
doc->setValue(a1_name, IntFieldValue(10));
doc->setValue(a2_name, IntFieldValue(15));
doc->setValue(a3_name, IntFieldValue(20));
@@ -871,7 +871,7 @@ TEST_F(AttributeWriterTest, tensor_attributes_using_two_phase_put_are_in_separat
class TwoPhasePutTest : public AttributeWriterTest {
public:
- EmptyDocBuilder builder;
+ DocBuilder builder;
vespalib::string doc_id;
std::shared_ptr<MockDenseTensorAttribute> attr;
std::unique_ptr<Value> tensor;
diff --git a/searchcore/src/tests/proton/attribute/document_field_populator/CMakeLists.txt b/searchcore/src/tests/proton/attribute/document_field_populator/CMakeLists.txt
index dea03cbf040..41b2037b6cb 100644
--- a/searchcore/src/tests/proton/attribute/document_field_populator/CMakeLists.txt
+++ b/searchcore/src/tests/proton/attribute/document_field_populator/CMakeLists.txt
@@ -5,5 +5,6 @@ vespa_add_executable(searchcore_document_field_populator_test_app TEST
DEPENDS
searchcore_attribute
searchcore_pcommon
+ searchlib_test
)
vespa_add_test(NAME searchcore_document_field_populator_test_app COMMAND searchcore_document_field_populator_test_app)
diff --git a/searchcore/src/tests/proton/attribute/document_field_populator/document_field_populator_test.cpp b/searchcore/src/tests/proton/attribute/document_field_populator/document_field_populator_test.cpp
index 055a38b9943..e831e8b2ac7 100644
--- a/searchcore/src/tests/proton/attribute/document_field_populator/document_field_populator_test.cpp
+++ b/searchcore/src/tests/proton/attribute/document_field_populator/document_field_populator_test.cpp
@@ -7,7 +7,7 @@
#include <vespa/searchcore/proton/attribute/document_field_populator.h>
#include <vespa/searchlib/attribute/attributefactory.h>
#include <vespa/searchlib/attribute/integerbase.h>
-#include <vespa/searchlib/index/empty_doc_builder.h>
+#include <vespa/searchlib/test/doc_builder.h>
#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/log/log.h>
@@ -16,14 +16,14 @@ LOG_SETUP("document_field_populator_test");
using namespace document;
using namespace proton;
using namespace search;
-using namespace search::index;
+using search::test::DocBuilder;
typedef search::attribute::Config AVConfig;
typedef search::attribute::BasicType AVBasicType;
struct DocContext
{
- EmptyDocBuilder _builder;
+ DocBuilder _builder;
DocContext()
: _builder([](auto& header) { header.addField("a1", DataType::T_INT); })
{
diff --git a/searchcore/src/tests/proton/docsummary/docsummary.cpp b/searchcore/src/tests/proton/docsummary/docsummary.cpp
index 09950e708bf..2de55e36566 100644
--- a/searchcore/src/tests/proton/docsummary/docsummary.cpp
+++ b/searchcore/src/tests/proton/docsummary/docsummary.cpp
@@ -51,8 +51,8 @@
#include <vespa/searchlib/attribute/interlock.h>
#include <vespa/searchlib/engine/docsumapi.h>
#include <vespa/searchlib/index/dummyfileheadercontext.h>
-#include <vespa/searchlib/index/empty_doc_builder.h>
#include <vespa/searchlib/tensor/tensor_attribute.h>
+#include <vespa/searchlib/test/doc_builder.h>
#include <vespa/searchlib/transactionlog/nosyncproxy.h>
#include <vespa/searchlib/transactionlog/translogserver.h>
#include <vespa/searchsummary/docsummary/i_docsum_field_writer_factory.h>
@@ -91,6 +91,7 @@ using search::TuneFileDocumentDB;
using search::index::DummyFileHeaderContext;
using search::linguistics::SPANTREE_NAME;
using search::linguistics::TERM;
+using search::test::DocBuilder;
using storage::spi::Timestamp;
using vespa::config::search::core::ProtonConfig;
using vespa::config::content::core::BucketspacesConfig;
@@ -128,7 +129,7 @@ private:
vespalib::string _dir;
};
-class BuildContext : public EmptyDocBuilder
+class BuildContext : public DocBuilder
{
public:
DirMaker _dmk;
@@ -155,7 +156,7 @@ public:
};
BuildContext::BuildContext(AddFieldsType add_fields)
- : EmptyDocBuilder(add_fields),
+ : DocBuilder(add_fields),
_dmk("summary"),
_fixed_repo(get_repo(), get_document_type()),
_summaryExecutor(4, 128_Ki),
diff --git a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
index e84c1af3a0c..7394ef1214c 100644
--- a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
@@ -30,8 +30,8 @@
#include <vespa/searchcore/proton/test/thread_utils.h>
#include <vespa/searchcore/proton/test/transport_helper.h>
#include <vespa/searchlib/attribute/interlock.h>
-#include <vespa/searchlib/index/empty_doc_builder.h>
#include <vespa/searchlib/test/directory_handler.h>
+#include <vespa/searchlib/test/doc_builder.h>
#include <vespa/searchcommon/attribute/config.h>
#include <vespa/config-bucketspaces.h>
#include <vespa/config/subscription/sourcespec.h>
@@ -63,6 +63,7 @@ using proton::bucketdb::IBucketDBHandler;
using proton::bucketdb::IBucketDBHandlerInitializer;
using vespalib::IDestructorCallback;
using search::test::DirectoryHandler;
+using search::test::DocBuilder;
using searchcorespi::IFlushTarget;
using searchcorespi::index::IThreadingService;
using storage::spi::Timestamp;
@@ -261,7 +262,7 @@ struct TwoAttrSchema : public OneAttrSchema
}
};
-EmptyDocBuilder::AddFieldsType
+DocBuilder::AddFieldsType
get_add_fields(bool has_attr2)
{
return [has_attr2](auto& header) {
@@ -276,7 +277,7 @@ struct MyConfigSnapshot
{
typedef std::unique_ptr<MyConfigSnapshot> UP;
Schema _schema;
- EmptyDocBuilder _builder;
+ DocBuilder _builder;
DocumentDBConfig::SP _cfg;
BootstrapConfig::SP _bootstrap;
MyConfigSnapshot(FNET_Transport & transport, const Schema &schema, const vespalib::string &cfgDir)
@@ -760,7 +761,7 @@ template <typename FixtureType>
struct DocumentHandler
{
FixtureType &_f;
- EmptyDocBuilder _builder;
+ DocBuilder _builder;
DocumentHandler(FixtureType &f) : _f(f), _builder(get_add_fields(f._baseSchema.getNumAttributeFields() > 1)) {}
static constexpr uint32_t BUCKET_USED_BITS = 8;
static DocumentId createDocId(uint32_t docId)
diff --git a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp
index 4fc38992368..abd3fba65fd 100644
--- a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp
@@ -33,8 +33,8 @@
#include <vespa/searchcore/proton/server/ireplayconfig.h>
#include <vespa/searchcore/proton/test/dummy_feed_view.h>
#include <vespa/searchcore/proton/test/transport_helper.h>
-#include <vespa/searchlib/index/empty_doc_builder.h>
#include <vespa/searchlib/index/dummyfileheadercontext.h>
+#include <vespa/searchlib/test/doc_builder.h>
#include <vespa/searchlib/transactionlog/translogserver.h>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/vespalib/util/lambdatask.h>
@@ -59,6 +59,7 @@ using search::SerialNum;
using search::index::schema::CollectionType;
using search::index::schema::DataType;
using vespalib::makeLambdaTask;
+using search::test::DocBuilder;
using search::transactionlog::TransLogServer;
using search::transactionlog::DomainConfig;
using storage::spi::RemoveResult;
@@ -276,7 +277,7 @@ MyFeedView::~MyFeedView() = default;
struct SchemaContext {
Schema::SP schema;
- EmptyDocBuilder builder;
+ DocBuilder builder;
SchemaContext();
SchemaContext(bool has_i2);
~SchemaContext();
@@ -320,7 +321,7 @@ SchemaContext::addField(vespalib::stringref fieldName)
struct DocumentContext {
Document::SP doc;
BucketId bucketId;
- DocumentContext(const vespalib::string &docId, EmptyDocBuilder &builder) :
+ DocumentContext(const vespalib::string &docId, DocBuilder &builder) :
doc(builder.make_document(docId)),
bucketId(BucketFactory::getBucketId(doc->getId()))
{
@@ -340,7 +341,7 @@ TensorDataType tensor1DType(ValueType::from_spec("tensor(x{})"));
struct UpdateContext {
DocumentUpdate::SP update;
BucketId bucketId;
- UpdateContext(const vespalib::string &docId, EmptyDocBuilder &builder) :
+ UpdateContext(const vespalib::string &docId, DocBuilder &builder) :
update(std::make_shared<DocumentUpdate>(builder.get_repo(), builder.get_document_type(), DocumentId(docId))),
bucketId(BucketFactory::getBucketId(update->getId()))
{
diff --git a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
index d0b7b03c3ab..5758e69dea4 100644
--- a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
@@ -26,7 +26,7 @@
#include <vespa/searchcore/proton/test/threading_service_observer.h>
#include <vespa/searchcore/proton/test/transport_helper.h>
#include <vespa/searchlib/attribute/attributefactory.h>
-#include <vespa/searchlib/index/empty_doc_builder.h>
+#include <vespa/searchlib/test/doc_builder.h>
#include <vespa/searchcommon/attribute/config.h>
#include <vespa/vespalib/util/destructor_callbacks.h>
#include <vespa/vespalib/stllike/asciistream.h>
@@ -49,6 +49,7 @@ using vespalib::GateCallback;
using search::SearchableStats;
using search::index::schema::CollectionType;
using search::index::schema::DataType;
+using search::test::DocBuilder;
using searchcorespi::IndexSearchable;
using storage::spi::BucketChecksum;
using storage::spi::BucketInfo;
@@ -436,7 +437,7 @@ MyTransport::~MyTransport() = default;
struct SchemaContext
{
Schema::SP _schema;
- EmptyDocBuilder _builder;
+ DocBuilder _builder;
SchemaContext();
~SchemaContext();
std::shared_ptr<const document::DocumentTypeRepo> getRepo() const { return _builder.get_repo_sp(); }
@@ -466,16 +467,16 @@ struct DocumentContext
BucketId bid;
Timestamp ts;
typedef std::vector<DocumentContext> List;
- DocumentContext(const vespalib::string &docId, uint64_t timestamp, EmptyDocBuilder &builder);
+ DocumentContext(const vespalib::string &docId, uint64_t timestamp, DocBuilder &builder);
~DocumentContext();
- void addFieldUpdate(EmptyDocBuilder &builder, const vespalib::string &fieldName) {
+ void addFieldUpdate(DocBuilder &builder, const vespalib::string &fieldName) {
const document::Field &field = builder.get_document_type().getField(fieldName);
upd->addUpdate(document::FieldUpdate(field));
}
document::GlobalId gid() const { return doc->getId().getGlobalId(); }
};
-DocumentContext::DocumentContext(const vespalib::string &docId, uint64_t timestamp, EmptyDocBuilder& builder)
+DocumentContext::DocumentContext(const vespalib::string &docId, uint64_t timestamp, DocBuilder& builder)
: doc(builder.make_document(docId)),
upd(std::make_shared<DocumentUpdate>(builder.get_repo(), builder.get_document_type(), doc->getId())),
bid(BucketFactory::getNumBucketBits(), doc->getId().getGlobalId().convertToBucketId().getRawId()),
@@ -555,7 +556,7 @@ struct FixtureBase
return getMetaStore().getMetaData(doc_.doc->getId().getGlobalId());
}
- EmptyDocBuilder &getBuilder() { return sc._builder; }
+ DocBuilder &getBuilder() { return sc._builder; }
DocumentContext doc(const vespalib::string &docId, uint64_t timestamp) {
return DocumentContext(docId, timestamp, getBuilder());
diff --git a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_common.h b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_common.h
index 806729a108c..af984cb357e 100644
--- a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_common.h
+++ b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_common.h
@@ -24,7 +24,7 @@ using document::Document;
using document::DocumentId;
using document::DocumentTypeRepo;
using namespace proton;
-using search::index::EmptyDocBuilder;
+using search::test::DocBuilder;
using namespace search;
using namespace vespalib;
using vespalib::IDestructorCallback;
@@ -63,7 +63,7 @@ struct MyScanIterator : public IDocumentScanIterator {
};
struct MyHandler : public ILidSpaceCompactionHandler {
- EmptyDocBuilder _builder;
+ DocBuilder _builder;
std::vector<LidUsageStats> _stats;
std::vector<LidVector> _lids;
mutable uint32_t _moveFromLid;
@@ -107,14 +107,14 @@ struct MyStorer : public IOperationStorer {
CommitResult startCommit(DoneCallback) override;
};
-struct MyFeedView : public test::DummyFeedView {
+struct MyFeedView : public proton::test::DummyFeedView {
explicit MyFeedView(std::shared_ptr<const DocumentTypeRepo> repo)
- : test::DummyFeedView(std::move(repo))
+ : proton::test::DummyFeedView(std::move(repo))
{
}
};
-struct MyDocumentStore : public test::DummyDocumentStore {
+struct MyDocumentStore : public proton::test::DummyDocumentStore {
Document::SP _readDoc;
mutable uint32_t _readLid;
MyDocumentStore();
diff --git a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_handler_test.cpp b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_handler_test.cpp
index fd38853dca1..011de4fc298 100644
--- a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_handler_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_handler_test.cpp
@@ -5,7 +5,7 @@
#include <vespa/vespalib/gtest/gtest.h>
struct HandlerTest : public ::testing::Test {
- EmptyDocBuilder _docBuilder;
+ DocBuilder _docBuilder;
std::shared_ptr<bucketdb::BucketDBOwner> _bucketDB;
MyDocumentStore _docStore;
MySubDb _subDb;
diff --git a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_jobtest.cpp b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_jobtest.cpp
index 8f88d678c0c..b941161cc35 100644
--- a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_jobtest.cpp
+++ b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_jobtest.cpp
@@ -116,7 +116,7 @@ JobTestBase::compact() {
void
JobTestBase::notifyNodeRetired(bool nodeRetired) {
- test::BucketStateCalculator::SP calc = std::make_shared<test::BucketStateCalculator>();
+ proton::test::BucketStateCalculator::SP calc = std::make_shared<proton::test::BucketStateCalculator>();
calc->setNodeRetired(nodeRetired);
_clusterStateHandler.notifyClusterStateChanged(calc);
}
diff --git a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_jobtest.h b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_jobtest.h
index 5875910f4d9..fb4c6d0478a 100644
--- a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_jobtest.h
+++ b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_jobtest.h
@@ -10,8 +10,8 @@
namespace storage::spi::dummy { class DummyBucketExecutor; }
struct JobTestBase : public ::testing::Test {
vespalib::MonitoredRefCount _refCount;
- test::ClusterStateHandler _clusterStateHandler;
- test::DiskMemUsageNotifier _diskMemUsageNotifier;
+ proton::test::ClusterStateHandler _clusterStateHandler;
+ proton::test::DiskMemUsageNotifier _diskMemUsageNotifier;
std::unique_ptr<storage::spi::dummy::DummyBucketExecutor> _bucketExecutor;
std::unique_ptr<vespalib::SyncableThreadExecutor> _singleExecutor;
std::unique_ptr<searchcorespi::index::ISyncableThreadService> _master;
diff --git a/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp b/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp
index 67342df5613..b8f5fd232de 100644
--- a/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp
@@ -14,7 +14,7 @@
#include <vespa/searchcore/proton/test/mock_summary_adapter.h>
#include <vespa/searchcore/proton/test/transport_helper.h>
#include <vespa/searchcore/proton/test/thread_utils.h>
-#include <vespa/searchlib/index/empty_doc_builder.h>
+#include <vespa/searchlib/test/doc_builder.h>
#include <vespa/vespalib/util/destructor_callbacks.h>
#include <vespa/vespalib/util/size_literals.h>
#include <vespa/vespalib/testkit/testapp.h>
@@ -33,8 +33,8 @@ using namespace proton;
using search::DocumentIdT;
using vespalib::IDestructorCallback;
using search::SerialNum;
-using search::index::EmptyDocBuilder;
using search::index::Schema;
+using search::test::DocBuilder;
using storage::spi::Timestamp;
using vespalib::make_string;
@@ -60,7 +60,7 @@ public:
};
std::shared_ptr<const DocumentTypeRepo> myGetDocumentTypeRepo() {
- EmptyDocBuilder builder;
+ DocBuilder builder;
std::shared_ptr<const DocumentTypeRepo> repo = builder.get_repo_sp();
ASSERT_TRUE(repo.get());
return repo;
diff --git a/searchcore/src/tests/proton/feed_and_search/CMakeLists.txt b/searchcore/src/tests/proton/feed_and_search/CMakeLists.txt
index a565d791988..24588d21d99 100644
--- a/searchcore/src/tests/proton/feed_and_search/CMakeLists.txt
+++ b/searchcore/src/tests/proton/feed_and_search/CMakeLists.txt
@@ -3,5 +3,6 @@ vespa_add_executable(searchcore_feed_and_search_test_app TEST
SOURCES
feed_and_search.cpp
DEPENDS
+ searchlib_test
)
vespa_add_test(NAME searchcore_feed_and_search_test_app COMMAND searchcore_feed_and_search_test_app)
diff --git a/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp b/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp
index 49f13d8c5b5..3ae7a55aabd 100644
--- a/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp
+++ b/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp
@@ -12,10 +12,10 @@
#include <vespa/searchlib/diskindex/fusion.h>
#include <vespa/searchlib/diskindex/indexbuilder.h>
#include <vespa/searchlib/fef/fef.h>
-#include <vespa/searchlib/index/empty_doc_builder.h>
#include <vespa/searchlib/index/dummyfileheadercontext.h>
-#include <vespa/searchlib/index/string_field_builder.h>
#include <vespa/searchlib/memoryindex/memory_index.h>
+#include <vespa/searchlib/test/doc_builder.h>
+#include <vespa/searchlib/test/string_field_builder.h>
#include <vespa/searchlib/test/index/mock_field_length_inspector.h>
#include <vespa/searchlib/query/base.h>
#include <vespa/searchlib/query/tree/simplequery.h>
@@ -48,10 +48,8 @@ using search::fef::MatchData;
using search::fef::MatchDataLayout;
using search::fef::TermFieldHandle;
using search::fef::TermFieldMatchData;
-using search::index::EmptyDocBuilder;
using search::index::DummyFileHeaderContext;
using search::index::Schema;
-using search::index::StringFieldBuilder;
using search::index::test::MockFieldLengthInspector;
using search::memoryindex::MemoryIndex;
using search::query::SimpleStringTerm;
@@ -61,6 +59,8 @@ using search::queryeval::FieldSpec;
using search::queryeval::FieldSpecList;
using search::queryeval::SearchIterator;
using search::queryeval::Searchable;
+using search::test::DocBuilder;
+using search::test::StringFieldBuilder;
using std::ostringstream;
using vespalib::string;
@@ -118,7 +118,7 @@ Schema getSchema() {
return schema;
}
-Document::UP buildDocument(EmptyDocBuilder & doc_builder, int id,
+Document::UP buildDocument(DocBuilder & doc_builder, int id,
const string &word) {
ostringstream ost;
ost << "id:ns:searchdocument::" << id;
@@ -169,7 +169,7 @@ void Test::requireThatMemoryIndexCanBeDumpedAndSearched() {
auto indexFieldInverter = vespalib::SequencedTaskExecutor::create(invert_executor, 2);
auto indexFieldWriter = vespalib::SequencedTaskExecutor::create(write_executor, 2);
MemoryIndex memory_index(schema, MockFieldLengthInspector(), *indexFieldInverter, *indexFieldWriter);
- EmptyDocBuilder doc_builder([](auto& header) { header.addField(field_name, DataType::T_STRING); });
+ DocBuilder doc_builder([](auto& header) { header.addField(field_name, DataType::T_STRING); });
Document::UP doc = buildDocument(doc_builder, doc_id1, word1);
memory_index.insertDocument(doc_id1, *doc, {});
diff --git a/searchcore/src/tests/proton/index/fusionrunner_test.cpp b/searchcore/src/tests/proton/index/fusionrunner_test.cpp
index 166d34f366b..0475d37b32c 100644
--- a/searchcore/src/tests/proton/index/fusionrunner_test.cpp
+++ b/searchcore/src/tests/proton/index/fusionrunner_test.cpp
@@ -11,9 +11,9 @@
#include <vespa/searchlib/diskindex/diskindex.h>
#include <vespa/searchlib/diskindex/indexbuilder.h>
#include <vespa/searchlib/fef/matchdatalayout.h>
-#include <vespa/searchlib/index/empty_doc_builder.h>
#include <vespa/searchlib/index/dummyfileheadercontext.h>
-#include <vespa/searchlib/index/string_field_builder.h>
+#include <vespa/searchlib/test/doc_builder.h>
+#include <vespa/searchlib/test/string_field_builder.h>
#include <vespa/searchlib/memoryindex/memory_index.h>
#include <vespa/searchlib/query/tree/simplequery.h>
#include <vespa/searchlib/test/index/mock_field_length_inspector.h>
@@ -43,10 +43,8 @@ using search::fef::MatchData;
using search::fef::MatchDataLayout;
using search::fef::TermFieldHandle;
using search::fef::TermFieldMatchData;
-using search::index::EmptyDocBuilder;
using search::index::DummyFileHeaderContext;
using search::index::Schema;
-using search::index::StringFieldBuilder;
using search::index::schema::DataType;
using search::index::test::MockFieldLengthInspector;
using search::memoryindex::MemoryIndex;
@@ -57,6 +55,8 @@ using search::queryeval::FieldSpec;
using search::queryeval::FieldSpecList;
using search::queryeval::ISourceSelector;
using search::queryeval::SearchIterator;
+using search::test::DocBuilder;
+using search::test::StringFieldBuilder;
using searchcorespi::index::FusionRunner;
using searchcorespi::index::FusionSpec;
using std::set;
@@ -155,7 +155,7 @@ void Test::tearDown() {
_selector.reset(0);
}
-Document::UP buildDocument(EmptyDocBuilder & doc_builder, int id, const string &word) {
+Document::UP buildDocument(DocBuilder & doc_builder, int id, const string &word) {
vespalib::asciistream ost;
ost << "id:ns:searchdocument::" << id;
auto doc = doc_builder.make_document(ost.str());
@@ -163,7 +163,7 @@ Document::UP buildDocument(EmptyDocBuilder & doc_builder, int id, const string &
return doc;
}
-void addDocument(EmptyDocBuilder & doc_builder, MemoryIndex &index, ISourceSelector &selector,
+void addDocument(DocBuilder & doc_builder, MemoryIndex &index, ISourceSelector &selector,
uint8_t index_id, uint32_t docid, const string &word) {
Document::UP doc = buildDocument(doc_builder, docid, word);
index.insertDocument(docid, *doc, {});
@@ -187,7 +187,7 @@ void Test::createIndex(const string &dir, uint32_t id, bool fusion) {
_selector->setDefaultSource(id - _selector->getBaseId());
Schema schema = getSchema();
- EmptyDocBuilder doc_builder([](auto& header) { header.addField(field_name, document::DataType::T_STRING); });
+ DocBuilder doc_builder([](auto& header) { header.addField(field_name, document::DataType::T_STRING); });
MemoryIndex memory_index(schema, MockFieldLengthInspector(),
_service.write().indexFieldInverter(),
_service.write().indexFieldWriter());
diff --git a/searchcore/src/tests/proton/index/index_writer/index_writer_test.cpp b/searchcore/src/tests/proton/index/index_writer/index_writer_test.cpp
index 7202d7f0abe..7a135e46937 100644
--- a/searchcore/src/tests/proton/index/index_writer/index_writer_test.cpp
+++ b/searchcore/src/tests/proton/index/index_writer/index_writer_test.cpp
@@ -3,7 +3,7 @@
#include <vespa/searchcore/proton/index/index_writer.h>
#include <vespa/document/fieldvalue/document.h>
#include <vespa/searchcore/proton/test/mock_index_manager.h>
-#include <vespa/searchlib/index/empty_doc_builder.h>
+#include <vespa/searchlib/test/doc_builder.h>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/vespalib/util/stringfmt.h>
@@ -14,6 +14,7 @@ using namespace proton;
using namespace search;
using namespace search::index;
using namespace searchcorespi;
+using search::test::DocBuilder;
using vespalib::IDestructorCallback;
using document::Document;
@@ -29,7 +30,7 @@ toString(const std::vector<SerialNum> &vec)
return oss.str();
}
-struct MyIndexManager : public test::MockIndexManager
+struct MyIndexManager : public proton::test::MockIndexManager
{
typedef std::map<uint32_t, std::vector<SerialNum> > LidMap;
LidMap puts;
@@ -82,7 +83,7 @@ struct Fixture
IIndexManager::SP iim;
MyIndexManager &mim;
IndexWriter iw;
- EmptyDocBuilder builder;
+ DocBuilder builder;
Document::UP dummyDoc;
Fixture()
: iim(new MyIndexManager()),
diff --git a/searchcore/src/tests/proton/index/indexmanager_test.cpp b/searchcore/src/tests/proton/index/indexmanager_test.cpp
index 886978f7465..68f1d4d0d0e 100644
--- a/searchcore/src/tests/proton/index/indexmanager_test.cpp
+++ b/searchcore/src/tests/proton/index/indexmanager_test.cpp
@@ -13,9 +13,9 @@
#include <vespa/vespalib/util/sequencedtaskexecutor.h>
#include <vespa/searchlib/common/flush_token.h>
#include <vespa/searchlib/common/serialnum.h>
-#include <vespa/searchlib/index/empty_doc_builder.h>
#include <vespa/searchlib/index/dummyfileheadercontext.h>
-#include <vespa/searchlib/index/string_field_builder.h>
+#include <vespa/searchlib/test/doc_builder.h>
+#include <vespa/searchlib/test/string_field_builder.h>
#include <vespa/searchlib/memoryindex/compact_words_store.h>
#include <vespa/searchlib/memoryindex/document_inverter.h>
#include <vespa/searchlib/memoryindex/document_inverter_context.h>
@@ -48,16 +48,16 @@ using search::TuneFileAttributes;
using search::TuneFileIndexManager;
using search::TuneFileIndexing;
using vespalib::datastore::EntryRef;
-using search::index::EmptyDocBuilder;
using search::index::DummyFileHeaderContext;
using search::index::FieldLengthInfo;
using search::index::Schema;
-using search::index::StringFieldBuilder;
using search::index::schema::DataType;
using search::index::test::MockFieldLengthInspector;
using search::memoryindex::CompactWordsStore;
using search::memoryindex::FieldIndexCollection;
using search::queryeval::Source;
+using search::test::DocBuilder;
+using search::test::StringFieldBuilder;
using std::set;
using std::string;
using vespalib::makeLambdaTask;
@@ -95,7 +95,7 @@ void removeTestData() {
std::filesystem::remove_all(std::filesystem::path(index_dir));
}
-Document::UP buildDocument(EmptyDocBuilder &doc_builder, int id,
+Document::UP buildDocument(DocBuilder &doc_builder, int id,
const string &word) {
vespalib::asciistream ost;
ost << "id:ns:searchdocument::" << id;
@@ -117,7 +117,7 @@ struct IndexManagerTest : public ::testing::Test {
TransportAndExecutorService _service;
std::unique_ptr<IndexManager> _index_manager;
Schema _schema;
- EmptyDocBuilder _builder;
+ DocBuilder _builder;
IndexManagerTest()
: _serial_num(0),
diff --git a/searchcore/src/tests/proton/reprocessing/document_reprocessing_handler/CMakeLists.txt b/searchcore/src/tests/proton/reprocessing/document_reprocessing_handler/CMakeLists.txt
index f776734757d..e980ae817f1 100644
--- a/searchcore/src/tests/proton/reprocessing/document_reprocessing_handler/CMakeLists.txt
+++ b/searchcore/src/tests/proton/reprocessing/document_reprocessing_handler/CMakeLists.txt
@@ -4,5 +4,6 @@ vespa_add_executable(searchcore_document_reprocessing_handler_test_app TEST
document_reprocessing_handler_test.cpp
DEPENDS
searchcore_reprocessing
+ searchlib_test
)
vespa_add_test(NAME searchcore_document_reprocessing_handler_test_app COMMAND searchcore_document_reprocessing_handler_test_app)
diff --git a/searchcore/src/tests/proton/reprocessing/document_reprocessing_handler/document_reprocessing_handler_test.cpp b/searchcore/src/tests/proton/reprocessing/document_reprocessing_handler/document_reprocessing_handler_test.cpp
index 719e762288e..0755a172945 100644
--- a/searchcore/src/tests/proton/reprocessing/document_reprocessing_handler/document_reprocessing_handler_test.cpp
+++ b/searchcore/src/tests/proton/reprocessing/document_reprocessing_handler/document_reprocessing_handler_test.cpp
@@ -3,12 +3,12 @@
LOG_SETUP("document_reprocessing_handler_test");
#include <vespa/searchcore/proton/reprocessing/document_reprocessing_handler.h>
-#include <vespa/searchlib/index/empty_doc_builder.h>
+#include <vespa/searchlib/test/doc_builder.h>
#include <vespa/vespalib/testkit/testapp.h>
using namespace document;
using namespace proton;
-using namespace search::index;
+using search::test::DocBuilder;
template <typename ReprocessingType>
struct MyProcessor : public ReprocessingType
@@ -32,7 +32,7 @@ const vespalib::string DOC_ID = "id:test:searchdocument::0";
struct FixtureBase
{
DocumentReprocessingHandler _handler;
- EmptyDocBuilder _docBuilder;
+ DocBuilder _docBuilder;
FixtureBase(uint32_t docIdLimit);
~FixtureBase();
std::shared_ptr<Document> createDoc() {
diff --git a/searchcore/src/vespa/searchcore/proton/test/CMakeLists.txt b/searchcore/src/vespa/searchcore/proton/test/CMakeLists.txt
index 25570c4ad0c..ad86ce64d8e 100644
--- a/searchcore/src/vespa/searchcore/proton/test/CMakeLists.txt
+++ b/searchcore/src/vespa/searchcore/proton/test/CMakeLists.txt
@@ -20,4 +20,5 @@ vespa_add_library(searchcore_test STATIC
searchcore_server
searchcore_fconfig
searchcorespi
+ searchlib_test
)
diff --git a/searchcore/src/vespa/searchcore/proton/test/userdocumentsbuilder.h b/searchcore/src/vespa/searchcore/proton/test/userdocumentsbuilder.h
index 9e806c8a0bf..1c7a82ef5ba 100644
--- a/searchcore/src/vespa/searchcore/proton/test/userdocumentsbuilder.h
+++ b/searchcore/src/vespa/searchcore/proton/test/userdocumentsbuilder.h
@@ -2,7 +2,7 @@
#pragma once
#include "userdocuments.h"
-#include <vespa/searchlib/index/empty_doc_builder.h>
+#include <vespa/searchlib/test/doc_builder.h>
#include <vespa/vespalib/util/stringfmt.h>
namespace proton::test {
@@ -13,7 +13,7 @@ namespace proton::test {
class UserDocumentsBuilder
{
private:
- search::index::EmptyDocBuilder _builder;
+ search::test::DocBuilder _builder;
UserDocuments _docs;
public:
UserDocumentsBuilder();