diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2018-01-23 11:11:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-23 11:11:41 +0100 |
commit | e661ce4130b4b4bda7f9d2685cb54642b41f99ec (patch) | |
tree | df8c064cfe520034207333c222e67b64e3509029 /searchcore | |
parent | 10918d8a10c33e19c72eb60f3a2f1a3d30cb20b4 (diff) | |
parent | c2911c004dfc72677d348d137febb2339ec2ab18 (diff) |
Merge pull request #4748 from vespa-engine/revert-4733-toregge/add-imported-tensor-attribute-vector
Revert "Add imported tensor attribute vector"
Diffstat (limited to 'searchcore')
5 files changed, 19 insertions, 27 deletions
diff --git a/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp b/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp index 6da1ff890c9..899dc146c8e 100644 --- a/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp +++ b/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp @@ -24,7 +24,6 @@ LOG_SETUP("attribute_manager_test"); #include <vespa/searchlib/attribute/attributefactory.h> #include <vespa/searchlib/attribute/attributevector.hpp> #include <vespa/searchlib/attribute/imported_attribute_vector.h> -#include <vespa/searchlib/attribute/imported_attribute_vector_factory.h> #include <vespa/searchlib/attribute/integerbase.h> #include <vespa/searchlib/attribute/predicate_attribute.h> #include <vespa/searchlib/attribute/reference_attribute.h> @@ -59,7 +58,6 @@ using search::attribute::BasicType; using search::attribute::IAttributeContext; using search::attribute::IAttributeVector; using search::attribute::ImportedAttributeVector; -using search::attribute::ImportedAttributeVectorFactory; using search::attribute::ReferenceAttribute; using search::attribute::test::MockGidToLidMapperFactory; using search::index::DummyFileHeaderContext; @@ -139,7 +137,7 @@ struct ImportedAttributesRepoBuilder { refAttr->setGidToLidMapperFactory(std::make_shared<MockGidToLidMapperFactory>()); auto targetAttr = search::AttributeFactory::createAttribute(name + "_target", INT32_SINGLE); auto documentMetaStore = std::shared_ptr<search::IDocumentMetaStoreContext>(); - auto importedAttr = ImportedAttributeVectorFactory::create(name, refAttr, targetAttr, documentMetaStore, false); + auto importedAttr = std::make_shared<ImportedAttributeVector>(name, refAttr, targetAttr, documentMetaStore, false); _repo->add(name, importedAttr); } ImportedAttributesRepo::UP build() { diff --git a/searchcore/src/tests/proton/attribute/attribute_test.cpp b/searchcore/src/tests/proton/attribute/attribute_test.cpp index 6e8191e7d40..cb1df2df0c5 100644 --- a/searchcore/src/tests/proton/attribute/attribute_test.cpp +++ b/searchcore/src/tests/proton/attribute/attribute_test.cpp @@ -25,7 +25,6 @@ LOG_SETUP("attribute_test"); #include <vespa/searchlib/attribute/attributevector.hpp> #include <vespa/searchlib/attribute/bitvector_search_cache.h> #include <vespa/searchlib/attribute/imported_attribute_vector.h> -#include <vespa/searchlib/attribute/imported_attribute_vector_factory.h> #include <vespa/searchlib/attribute/integerbase.h> #include <vespa/searchlib/attribute/predicate_attribute.h> #include <vespa/searchlib/attribute/singlenumericattribute.hpp> @@ -59,7 +58,6 @@ using search::TuneFileAttributes; using search::attribute::BitVectorSearchCache; using search::attribute::IAttributeVector; using search::attribute::ImportedAttributeVector; -using search::attribute::ImportedAttributeVectorFactory; using search::attribute::ReferenceAttribute; using search::index::DummyFileHeaderContext; using search::index::schema::CollectionType; @@ -746,11 +744,11 @@ TEST_F("require that attribute writer spreads write over 3 write contexts", Fixt ImportedAttributeVector::SP createImportedAttribute(const vespalib::string &name) { - auto result = ImportedAttributeVectorFactory::create(name, - ReferenceAttribute::SP(), - AttributeVector::SP(), - std::shared_ptr<search::IDocumentMetaStoreContext>(), - true); + auto result = std::make_shared<ImportedAttributeVector>(name, + ReferenceAttribute::SP(), + AttributeVector::SP(), + std::shared_ptr<search::IDocumentMetaStoreContext>(), + true); result->getSearchCache()->insert("foo", BitVectorSearchCache::Entry::SP()); return result; } diff --git a/searchcore/src/tests/proton/attribute/imported_attributes_context/imported_attributes_context_test.cpp b/searchcore/src/tests/proton/attribute/imported_attributes_context/imported_attributes_context_test.cpp index 1bee7a79192..aac74e1583d 100644 --- a/searchcore/src/tests/proton/attribute/imported_attributes_context/imported_attributes_context_test.cpp +++ b/searchcore/src/tests/proton/attribute/imported_attributes_context/imported_attributes_context_test.cpp @@ -8,7 +8,6 @@ LOG_SETUP("imported_attributes_context_test"); #include <vespa/searchlib/attribute/attribute.h> #include <vespa/searchlib/attribute/attributefactory.h> #include <vespa/searchlib/attribute/imported_attribute_vector.h> -#include <vespa/searchlib/attribute/imported_attribute_vector_factory.h> #include <vespa/searchlib/test/mock_gid_to_lid_mapping.h> #include <future> @@ -18,7 +17,6 @@ using search::attribute::BasicType; using search::attribute::Config; using search::attribute::IAttributeVector; using search::attribute::ImportedAttributeVector; -using search::attribute::ImportedAttributeVectorFactory; using search::attribute::ReferenceAttribute; using search::attribute::test::MockGidToLidMapperFactory; using generation_t = AttributeVector::generation_t; @@ -74,11 +72,11 @@ struct Fixture { { } Fixture &addAttribute(const vespalib::string &name) { - auto attr = ImportedAttributeVectorFactory::create(name, - createReferenceAttribute(name + "_ref"), - createTargetAttribute(name + "_target"), - std::shared_ptr<search::IDocumentMetaStoreContext>(), - false); + auto attr = std::make_shared<ImportedAttributeVector>(name, + createReferenceAttribute(name + "_ref"), + createTargetAttribute(name + "_target"), + std::shared_ptr<search::IDocumentMetaStoreContext>(), + false); repo.add(name, attr); return *this; } diff --git a/searchcore/src/tests/proton/attribute/imported_attributes_repo/imported_attributes_repo_test.cpp b/searchcore/src/tests/proton/attribute/imported_attributes_repo/imported_attributes_repo_test.cpp index ddabed210d8..e23c308050b 100644 --- a/searchcore/src/tests/proton/attribute/imported_attributes_repo/imported_attributes_repo_test.cpp +++ b/searchcore/src/tests/proton/attribute/imported_attributes_repo/imported_attributes_repo_test.cpp @@ -7,7 +7,6 @@ LOG_SETUP("imported_attributes_repo_test"); #include <vespa/searchcommon/attribute/iattributevector.h> #include <vespa/searchcore/proton/attribute/imported_attributes_repo.h> #include <vespa/searchlib/attribute/imported_attribute_vector.h> -#include <vespa/searchlib/attribute/imported_attribute_vector_factory.h> #include <vespa/searchlib/attribute/reference_attribute.h> using proton::ImportedAttributesRepo; @@ -15,17 +14,16 @@ using search::AttributeVector; using search::attribute::BasicType; using search::attribute::Config; using search::attribute::ImportedAttributeVector; -using search::attribute::ImportedAttributeVectorFactory; using search::attribute::ReferenceAttribute; ImportedAttributeVector::SP createAttr(const vespalib::string &name) { - return ImportedAttributeVectorFactory::create(name, - ReferenceAttribute::SP(), - AttributeVector::SP(), - std::shared_ptr<search::IDocumentMetaStoreContext>(), - false); + return std::make_shared<ImportedAttributeVector>(name, + ReferenceAttribute::SP(), + AttributeVector::SP(), + std::shared_ptr<search::IDocumentMetaStoreContext>(), + false); } struct Fixture { diff --git a/searchcore/src/vespa/searchcore/proton/reference/document_db_reference_resolver.cpp b/searchcore/src/vespa/searchcore/proton/reference/document_db_reference_resolver.cpp index 9be0eb2c728..9abe8181282 100644 --- a/searchcore/src/vespa/searchcore/proton/reference/document_db_reference_resolver.cpp +++ b/searchcore/src/vespa/searchcore/proton/reference/document_db_reference_resolver.cpp @@ -9,7 +9,6 @@ #include <vespa/searchcommon/attribute/iattributevector.h> #include <vespa/searchlib/attribute/iattributemanager.h> #include <vespa/searchlib/attribute/imported_attribute_vector.h> -#include <vespa/searchlib/attribute/imported_attribute_vector_factory.h> #include <vespa/searchlib/attribute/reference_attribute.h> #include <vespa/config-imported-fields.h> #include <vespa/document/datatype/documenttype.h> @@ -23,7 +22,7 @@ using document::ReferenceDataType; using search::attribute::BasicType; using search::attribute::Config; using search::attribute::IAttributeVector; -using search::attribute::ImportedAttributeVectorFactory; +using search::attribute::ImportedAttributeVector; using search::attribute::ReferenceAttribute; using search::AttributeGuard; using search::AttributeVector; @@ -145,7 +144,8 @@ DocumentDBReferenceResolver::createImportedAttributesRepo(const IAttributeManage for (const auto &attr : _importedFieldsCfg.attribute) { ReferenceAttribute::SP refAttr = getReferenceAttribute(attr.referencefield, attrMgr); AttributeVector::SP targetAttr = getTargetDocumentDB(refAttr->getName())->getAttribute(attr.targetfield); - auto importedAttr = ImportedAttributeVectorFactory::create(attr.name, refAttr, targetAttr, documentMetaStore, useSearchCache); + ImportedAttributeVector::SP importedAttr = + std::make_shared<ImportedAttributeVector>(attr.name, refAttr, targetAttr, documentMetaStore, useSearchCache); result->add(importedAttr->getName(), importedAttr); } } |