diff options
author | Tor Brede Vekterli <vekterli@yahoo-inc.com> | 2017-02-23 18:02:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-23 18:02:08 +0100 |
commit | e552565cfe64bf48d91e74bd50c508aa5d6216f3 (patch) | |
tree | 5e01663f0d4b0af0a024015ebde419ad03c29f9f /searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h | |
parent | 65ca54a863c938c29541b215715b988a74f23d49 (diff) |
Revert "Add imported attribute vector"
Diffstat (limited to 'searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h')
-rw-r--r-- | searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h b/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h deleted file mode 100644 index 97f1606f125..00000000000 --- a/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -#pragma once - -#include "reference_attribute.h" -#include <vespa/searchcommon/attribute/iattributevector.h> -#include <vespa/vespalib/stllike/string.h> -#include <memory> - -namespace search { -namespace attribute { - -/** - * Attribute vector which does not store values of its own, but rather serves as a - * convenient indirection wrapper towards a target vector, usually in another - * document type altogether. Imported attributes are meant to be used in conjunction - * with a reference attribute, which specifies a dynamic mapping from a local LID to - * a target LID (via an intermediate GID). - * - * Any accessor on the imported attribute for a local LID yields the same result as - * if the same accessor were invoked with the target LID on the target attribute vector. - */ -class ImportedAttributeVector : public IAttributeVector { -public: - ImportedAttributeVector(vespalib::stringref name, - std::shared_ptr<ReferenceAttribute> reference_attribute, - std::shared_ptr<AttributeVector> target_attribute); - ~ImportedAttributeVector(); - - const vespalib::string & getName() const override; - uint32_t getNumDocs() const override; - uint32_t getValueCount(uint32_t doc) const override; - uint32_t getMaxValueCount() const override; - largeint_t getInt(DocId doc) const override; - double getFloat(DocId doc) const override; - const char * getString(DocId doc, char * buffer, size_t sz) const override; - EnumHandle getEnum(DocId doc) const override; - uint32_t get(DocId docId, largeint_t * buffer, uint32_t sz) const override; - uint32_t get(DocId docId, double * buffer, uint32_t sz) const override; - uint32_t get(DocId docId, const char ** buffer, uint32_t sz) const override; - uint32_t get(DocId docId, EnumHandle * buffer, uint32_t sz) const override; - uint32_t get(DocId docId, WeightedInt * buffer, uint32_t sz) const override; - uint32_t get(DocId docId, WeightedFloat * buffer, uint32_t sz) const override; - uint32_t get(DocId docId, WeightedString * buffer, uint32_t sz) const override; - uint32_t get(DocId docId, WeightedConstChar * buffer, uint32_t sz) const override; - uint32_t get(DocId docId, WeightedEnum * buffer, uint32_t sz) const override; - bool findEnum(const char * value, EnumHandle & e) const override; - BasicType::Type getBasicType() const override; - size_t getFixedWidth() const override; - CollectionType::Type getCollectionType() const override; - bool hasEnum() const override; - - const std::shared_ptr<ReferenceAttribute>& getReferenceAttribute() const noexcept { - return _reference_attribute; - } - const std::shared_ptr<AttributeVector>& getTargetAttribute() const noexcept { - return _target_attribute; - } - -private: - long onSerializeForAscendingSort(DocId doc, void * serTo, long available, - const common::BlobConverter * bc) const override; - long onSerializeForDescendingSort(DocId doc, void * serTo, long available, - const common::BlobConverter * bc) const override; - - - vespalib::string _name; - std::shared_ptr<ReferenceAttribute> _reference_attribute; - std::shared_ptr<AttributeVector> _target_attribute; -}; - -} // attribute -} // search
\ No newline at end of file |