summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@yahoo-inc.com>2016-11-24 14:27:21 +0000
committerTor Egge <Tor.Egge@yahoo-inc.com>2016-11-25 12:16:35 +0000
commitf41889fdd3a489b85c2da8be81cad5a3cae4f188 (patch)
tree4b7cdbe1f56761b2ad1de98c17c7b101f9cb6221 /searchlib
parent9815d3ad28087327faff94263c75a62639c3ada1 (diff)
Remove references to old multivalue mapping.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/tests/attribute/attribute_test.cpp4
-rw-r--r--searchlib/src/tests/attribute/attributemanager/attributemanager_test.cpp3
-rw-r--r--searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp20
-rw-r--r--searchlib/src/vespa/searchlib/attribute/address_space_usage.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/attribute/createarrayfastsearch.cpp22
-rw-r--r--searchlib/src/vespa/searchlib/attribute/createarraystd.cpp22
-rw-r--r--searchlib/src/vespa/searchlib/attribute/createsetfastsearch.cpp22
-rw-r--r--searchlib/src/vespa/searchlib/attribute/createsetstd.cpp22
-rw-r--r--searchlib/src/vespa/searchlib/attribute/defines.h8
-rw-r--r--searchlib/src/vespa/searchlib/attribute/flagattribute.cpp1
-rw-r--r--searchlib/src/vespa/searchlib/attribute/flagattribute.h4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/load_utils.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multienumattribute.h2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multinumericattribute.h3
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.hpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multistringattribute.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multistringattribute.h9
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multistringpostattribute.h7
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multivalueattribute.h5
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postingchange.cpp30
21 files changed, 76 insertions, 126 deletions
diff --git a/searchlib/src/tests/attribute/attribute_test.cpp b/searchlib/src/tests/attribute/attribute_test.cpp
index 83e99f0a831..1fe77bb3d21 100644
--- a/searchlib/src/tests/attribute/attribute_test.cpp
+++ b/searchlib/src/tests/attribute/attribute_test.cpp
@@ -1728,7 +1728,7 @@ AttributeTest::testStatus()
expUsed += 1 * InternalNodeSize + 1 * LeafNodeSize; // enum store tree
expUsed += 1 * 32; // enum store (uniquevalues * bytes per entry)
// multi value mapping (numdocs * sizeof(MappingIndex) + numvalues * sizeof(EnumIndex))
- expUsed += 100 * sizeof(search::multivalue::Index32) + 100 * 4;
+ expUsed += 100 * sizeof(datastore::EntryRef) + 100 * 4;
EXPECT_GREATER_EQUAL(ptr->getStatus().getUsed(), expUsed);
EXPECT_GREATER_EQUAL(ptr->getStatus().getAllocated(), expUsed);
}
@@ -1752,7 +1752,7 @@ AttributeTest::testStatus()
expUsed += numUniq * 32; // enum store (16 unique values, 32 bytes per entry)
// multi value mapping (numdocs * sizeof(MappingIndex) + numvalues * sizeof(EnumIndex) +
// numdocs * sizeof(Array<EnumIndex>) (due to vector vector))
- expUsed += numDocs * sizeof(search::multivalue::Index32) + numDocs * numValuesPerDoc * sizeof(EnumStoreBase::Index) + ((numValuesPerDoc > 1024) ? numDocs * NestedVectorSize : 0);
+ expUsed += numDocs * sizeof(datastore::EntryRef) + numDocs * numValuesPerDoc * sizeof(EnumStoreBase::Index) + ((numValuesPerDoc > 1024) ? numDocs * NestedVectorSize : 0);
EXPECT_GREATER_EQUAL(ptr->getStatus().getUsed(), expUsed);
EXPECT_GREATER_EQUAL(ptr->getStatus().getAllocated(), expUsed);
}
diff --git a/searchlib/src/tests/attribute/attributemanager/attributemanager_test.cpp b/searchlib/src/tests/attribute/attributemanager/attributemanager_test.cpp
index 24b1d657d2f..6e1fc0ff80d 100644
--- a/searchlib/src/tests/attribute/attributemanager/attributemanager_test.cpp
+++ b/searchlib/src/tests/attribute/attributemanager/attributemanager_test.cpp
@@ -53,8 +53,7 @@ public:
typedef MultiValueNumericAttribute< IntegerAttributeTemplate<int32_t>,
- multivalue::MVMTemplateArg<
- multivalue::Value<int32_t>, multivalue::Index32> >
+ multivalue::Value<int32_t> >
TestAttributeBase;
class TestAttribute : public TestAttributeBase
diff --git a/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp b/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp
index 4f186282999..00d4ffab472 100644
--- a/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp
+++ b/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp
@@ -85,28 +85,24 @@ private:
Int32PostingListAttribute;
typedef MultiValueNumericPostingAttribute<
EnumAttribute<IntegerAttributeTemplate<int32_t> >,
- multivalue::MVMTemplateArg<
- multivalue::Value<EnumStoreBase::Index>,
- multivalue::Index32> > Int32ArrayPostingListAttribute;
+ multivalue::Value<EnumStoreBase::Index> >
+ Int32ArrayPostingListAttribute;
typedef MultiValueNumericPostingAttribute<
EnumAttribute<IntegerAttributeTemplate<int32_t> >,
- multivalue::MVMTemplateArg<
- multivalue::WeightedValue<EnumStoreBase::Index>,
- multivalue::Index32> > Int32WsetPostingListAttribute;
+ multivalue::WeightedValue<EnumStoreBase::Index> >
+ Int32WsetPostingListAttribute;
typedef SingleValueNumericPostingAttribute<
EnumAttribute<FloatingPointAttributeTemplate<float> > >
FloatPostingListAttribute;
typedef MultiValueNumericPostingAttribute<
EnumAttribute<FloatingPointAttributeTemplate<float> >,
- multivalue::MVMTemplateArg<
- multivalue::Value<EnumStoreBase::Index>,
- multivalue::Index32> > FloatArrayPostingListAttribute;
+ multivalue::Value<EnumStoreBase::Index> >
+ FloatArrayPostingListAttribute;
typedef MultiValueNumericPostingAttribute<
EnumAttribute<FloatingPointAttributeTemplate<float> >,
- multivalue::MVMTemplateArg<
- multivalue::WeightedValue<EnumStoreBase::Index>,
- multivalue::Index32> > FloatWsetPostingListAttribute;
+ multivalue::WeightedValue<EnumStoreBase::Index> >
+ FloatWsetPostingListAttribute;
typedef SingleValueStringPostingAttribute StringPostingListAttribute;
typedef ArrayStringPostingAttribute StringArrayPostingListAttribute;
diff --git a/searchlib/src/vespa/searchlib/attribute/address_space_usage.cpp b/searchlib/src/vespa/searchlib/attribute/address_space_usage.cpp
index c127b71de6b..83a47e77f63 100644
--- a/searchlib/src/vespa/searchlib/attribute/address_space_usage.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/address_space_usage.cpp
@@ -2,7 +2,6 @@
#include "address_space_usage.h"
#include "enumstorebase.h"
-#include "multivaluemapping.h"
namespace search {
@@ -26,7 +25,7 @@ AddressSpaceUsage::defaultEnumStoreUsage()
AddressSpace
AddressSpaceUsage::defaultMultiValueUsage()
{
- return AddressSpace(0, multivalue::Index32::offsetSize());
+ return AddressSpace(0, 8192);
}
} // namespace search
diff --git a/searchlib/src/vespa/searchlib/attribute/createarrayfastsearch.cpp b/searchlib/src/vespa/searchlib/attribute/createarrayfastsearch.cpp
index 1312fd2b331..e79e6de51b7 100644
--- a/searchlib/src/vespa/searchlib/attribute/createarrayfastsearch.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/createarrayfastsearch.cpp
@@ -23,10 +23,10 @@ namespace search {
using attribute::BasicType;
-#define INTARRAY(T, I) MultiValueNumericPostingAttribute< ENUM_ATTRIBUTE(IntegerAttributeTemplate<T>), MULTIVALUE_ENUM_ARG(I) >
-#define FLOATARRAY(T, I) MultiValueNumericPostingAttribute< ENUM_ATTRIBUTE(FloatingPointAttributeTemplate<T>), MULTIVALUE_ENUM_ARG(I) >
-#define CREATEINTARRAY(T, H, fname, info) H ? static_cast<AttributeVector *>(new INTARRAY(T, multivalue::Index64)(fname, info)) : static_cast<AttributeVector *>(new INTARRAY(T, multivalue::Index32)(fname, info))
-#define CREATEFLOATARRAY(T, H, fname, info) H ? static_cast<AttributeVector *>(new FLOATARRAY(T, multivalue::Index64)(fname, info)) : static_cast<AttributeVector *>(new FLOATARRAY(T, multivalue::Index32)(fname, info))
+#define INTARRAY(T) MultiValueNumericPostingAttribute< ENUM_ATTRIBUTE(IntegerAttributeTemplate<T>), MULTIVALUE_ENUM_ARG >
+#define FLOATARRAY(T) MultiValueNumericPostingAttribute< ENUM_ATTRIBUTE(FloatingPointAttributeTemplate<T>), MULTIVALUE_ENUM_ARG >
+#define CREATEINTARRAY(T, fname, info) static_cast<AttributeVector *>(new INTARRAY(T)(fname, info))
+#define CREATEFLOATARRAY(T, fname, info) static_cast<AttributeVector *>(new FLOATARRAY(T)(fname, info))
AttributeVector::SP
AttributeFactory::createArrayFastSearch(const vespalib::string & baseFileName, const Config & info)
@@ -40,25 +40,25 @@ AttributeFactory::createArrayFastSearch(const vespalib::string & baseFileName, c
case BasicType::UINT4:
break;
case BasicType::INT8:
- ret.reset(info.huge() ? static_cast<AttributeVector *>(new HugeFlagAttribute(baseFileName, info)) : static_cast<AttributeVector *>(new FlagAttribute(baseFileName, info)));
+ ret.reset(static_cast<AttributeVector *>(new FlagAttribute(baseFileName, info)));
break;
case BasicType::INT16:
- ret.reset(CREATEINTARRAY(int16_t, info.huge(), baseFileName, info));
+ ret.reset(CREATEINTARRAY(int16_t, baseFileName, info));
break;
case BasicType::INT32:
- ret.reset(CREATEINTARRAY(int32_t, info.huge(), baseFileName, info));
+ ret.reset(CREATEINTARRAY(int32_t, baseFileName, info));
break;
case BasicType::INT64:
- ret.reset(CREATEINTARRAY(int64_t, info.huge(), baseFileName, info));
+ ret.reset(CREATEINTARRAY(int64_t, baseFileName, info));
break;
case BasicType::FLOAT:
- ret.reset(CREATEFLOATARRAY(float, info.huge(), baseFileName, info));
+ ret.reset(CREATEFLOATARRAY(float, baseFileName, info));
break;
case BasicType::DOUBLE:
- ret.reset(CREATEFLOATARRAY(double, info.huge(), baseFileName, info));
+ ret.reset(CREATEFLOATARRAY(double, baseFileName, info));
break;
case BasicType::STRING:
- ret.reset(info.huge() ? static_cast<AttributeVector *>(new HugeArrayStringPostingAttribute(baseFileName, info)) : static_cast<AttributeVector *>(new ArrayStringPostingAttribute(baseFileName, info)));
+ ret.reset(static_cast<AttributeVector *>(new ArrayStringPostingAttribute(baseFileName, info)));
break;
default:
break;
diff --git a/searchlib/src/vespa/searchlib/attribute/createarraystd.cpp b/searchlib/src/vespa/searchlib/attribute/createarraystd.cpp
index 9a1bb04cbac..b47b27db729 100644
--- a/searchlib/src/vespa/searchlib/attribute/createarraystd.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/createarraystd.cpp
@@ -16,11 +16,11 @@ namespace search {
using attribute::BasicType;
-#define INTARRAY(T, I) MultiValueNumericAttribute< IntegerAttributeTemplate<T>, MULTIVALUE_ARG(T, I) >
-#define FLOATARRAY(T, I) MultiValueNumericAttribute< FloatingPointAttributeTemplate<T>, MULTIVALUE_ARG(T, I) >
+#define INTARRAY(T) MultiValueNumericAttribute< IntegerAttributeTemplate<T>, MULTIVALUE_ARG(T) >
+#define FLOATARRAY(T) MultiValueNumericAttribute< FloatingPointAttributeTemplate<T>, MULTIVALUE_ARG(T) >
-#define CREATEINTARRAY(T, H, fname, info) H ? static_cast<AttributeVector *>(new INTARRAY(T, multivalue::Index64)(fname, info)) : static_cast<AttributeVector *>(new INTARRAY(T, multivalue::Index32)(fname, info))
-#define CREATEFLOATARRAY(T, H, fname, info) H ? static_cast<AttributeVector *>(new FLOATARRAY(T, multivalue::Index64)(fname, info)) : static_cast<AttributeVector *>(new FLOATARRAY(T, multivalue::Index32)(fname, info))
+#define CREATEINTARRAY(T, fname, info) static_cast<AttributeVector *>(new INTARRAY(T)(fname, info))
+#define CREATEFLOATARRAY(T, fname, info) static_cast<AttributeVector *>(new FLOATARRAY(T)(fname, info))
AttributeVector::SP
@@ -34,25 +34,25 @@ AttributeFactory::createArrayStd(const vespalib::string & baseFileName, const Co
case BasicType::UINT4:
break;
case BasicType::INT8:
- ret.reset(CREATEINTARRAY(int8_t, info.huge(), baseFileName, info));
+ ret.reset(CREATEINTARRAY(int8_t, baseFileName, info));
break;
case BasicType::INT16:
- ret.reset(CREATEINTARRAY(int16_t, info.huge(), baseFileName, info));
+ ret.reset(CREATEINTARRAY(int16_t, baseFileName, info));
break;
case BasicType::INT32:
- ret.reset(CREATEINTARRAY(int32_t, info.huge(), baseFileName, info));
+ ret.reset(CREATEINTARRAY(int32_t, baseFileName, info));
break;
case BasicType::INT64:
- ret.reset(CREATEINTARRAY(int64_t, info.huge(), baseFileName, info));
+ ret.reset(CREATEINTARRAY(int64_t, baseFileName, info));
break;
case BasicType::FLOAT:
- ret.reset(CREATEFLOATARRAY(float, info.huge(), baseFileName, info));
+ ret.reset(CREATEFLOATARRAY(float, baseFileName, info));
break;
case BasicType::DOUBLE:
- ret.reset(CREATEFLOATARRAY(double, info.huge(), baseFileName, info));
+ ret.reset(CREATEFLOATARRAY(double, baseFileName, info));
break;
case BasicType::STRING:
- ret.reset(info.huge() ? static_cast<AttributeVector *>(new HugeArrayStringAttribute(baseFileName, info)) : static_cast<AttributeVector *>(new ArrayStringAttribute(baseFileName, info)));
+ ret.reset(static_cast<AttributeVector *>(new ArrayStringAttribute(baseFileName, info)));
break;
default:
break;
diff --git a/searchlib/src/vespa/searchlib/attribute/createsetfastsearch.cpp b/searchlib/src/vespa/searchlib/attribute/createsetfastsearch.cpp
index 0a15b252adc..31446b3be37 100644
--- a/searchlib/src/vespa/searchlib/attribute/createsetfastsearch.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/createsetfastsearch.cpp
@@ -23,11 +23,11 @@ namespace search {
using attribute::BasicType;
-#define INTSET(T, I) MultiValueNumericPostingAttribute< ENUM_ATTRIBUTE(IntegerAttributeTemplate<T>), WEIGHTED_MULTIVALUE_ENUM_ARG(I) >
-#define FLOATSET(T, I) MultiValueNumericPostingAttribute< ENUM_ATTRIBUTE(FloatingPointAttributeTemplate<T>), WEIGHTED_MULTIVALUE_ENUM_ARG(I) >
+#define INTSET(T) MultiValueNumericPostingAttribute< ENUM_ATTRIBUTE(IntegerAttributeTemplate<T>), WEIGHTED_MULTIVALUE_ENUM_ARG >
+#define FLOATSET(T) MultiValueNumericPostingAttribute< ENUM_ATTRIBUTE(FloatingPointAttributeTemplate<T>), WEIGHTED_MULTIVALUE_ENUM_ARG >
-#define CREATEINTSET(T, H, fname, info) H ? static_cast<AttributeVector *>(new INTSET(T, multivalue::Index64)(fname, info)) : static_cast<AttributeVector *>(new INTSET(T, multivalue::Index32)(fname, info))
-#define CREATEFLOATSET(T, H, fname, info) H ? static_cast<AttributeVector *>(new FLOATSET(T, multivalue::Index64)(fname, info)) : static_cast<AttributeVector *>(new FLOATSET(T, multivalue::Index32)(fname, info))
+#define CREATEINTSET(T, fname, info) static_cast<AttributeVector *>(new INTSET(T)(fname, info))
+#define CREATEFLOATSET(T, fname, info) static_cast<AttributeVector *>(new FLOATSET(T)(fname, info))
AttributeVector::SP
@@ -42,25 +42,25 @@ AttributeFactory::createSetFastSearch(const vespalib::string & baseFileName, con
case BasicType::UINT4:
break;
case BasicType::INT8:
- ret.reset(CREATEINTSET(int8_t, info.huge(), baseFileName, info));
+ ret.reset(CREATEINTSET(int8_t, baseFileName, info));
break;
case BasicType::INT16:
- ret.reset(CREATEINTSET(int16_t, info.huge(), baseFileName, info));
+ ret.reset(CREATEINTSET(int16_t, baseFileName, info));
break;
case BasicType::INT32:
- ret.reset(CREATEINTSET(int32_t, info.huge(), baseFileName, info));
+ ret.reset(CREATEINTSET(int32_t, baseFileName, info));
break;
case BasicType::INT64:
- ret.reset(CREATEINTSET(int64_t, info.huge(), baseFileName, info));
+ ret.reset(CREATEINTSET(int64_t, baseFileName, info));
break;
case BasicType::FLOAT:
- ret.reset(CREATEFLOATSET(float, info.huge(), baseFileName, info));
+ ret.reset(CREATEFLOATSET(float, baseFileName, info));
break;
case BasicType::DOUBLE:
- ret.reset(CREATEFLOATSET(double, info.huge(), baseFileName, info));
+ ret.reset(CREATEFLOATSET(double, baseFileName, info));
break;
case BasicType::STRING:
- ret.reset(info.huge() ? static_cast<AttributeVector *>(new HugeWeightedSetStringPostingAttribute(baseFileName, info)) : static_cast<AttributeVector *>(new WeightedSetStringPostingAttribute(baseFileName, info)));
+ ret.reset(static_cast<AttributeVector *>(new WeightedSetStringPostingAttribute(baseFileName, info)));
break;
default:
break;
diff --git a/searchlib/src/vespa/searchlib/attribute/createsetstd.cpp b/searchlib/src/vespa/searchlib/attribute/createsetstd.cpp
index b52593228b8..5aa40a20d14 100644
--- a/searchlib/src/vespa/searchlib/attribute/createsetstd.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/createsetstd.cpp
@@ -16,10 +16,10 @@ namespace search {
using attribute::BasicType;
-#define INTSET(T, I) MultiValueNumericAttribute< IntegerAttributeTemplate<T>, WEIGHTED_MULTIVALUE_ARG(T, I) >
-#define FLOATSET(T, I) MultiValueNumericAttribute< FloatingPointAttributeTemplate<T>, WEIGHTED_MULTIVALUE_ARG(T, I) >
-#define CREATEINTSET(T, H, fname, info) H ? static_cast<AttributeVector *>(new INTSET(T, multivalue::Index64)(fname, info)) : static_cast<AttributeVector *>(new INTSET(T, multivalue::Index32)(fname, info))
-#define CREATEFLOATSET(T, H, fname, info) H ? static_cast<AttributeVector *>(new FLOATSET(T, multivalue::Index64)(fname, info)) : static_cast<AttributeVector *>(new FLOATSET(T, multivalue::Index32)(fname, info))
+#define INTSET(T) MultiValueNumericAttribute< IntegerAttributeTemplate<T>, WEIGHTED_MULTIVALUE_ARG(T) >
+#define FLOATSET(T) MultiValueNumericAttribute< FloatingPointAttributeTemplate<T>, WEIGHTED_MULTIVALUE_ARG(T) >
+#define CREATEINTSET(T, fname, info) static_cast<AttributeVector *>(new INTSET(T)(fname, info))
+#define CREATEFLOATSET(T, fname, info) static_cast<AttributeVector *>(new FLOATSET(T)(fname, info))
AttributeVector::SP
@@ -33,25 +33,25 @@ AttributeFactory::createSetStd(const vespalib::string & baseFileName, const Conf
case BasicType::UINT4:
break;
case BasicType::INT8:
- ret.reset(CREATEINTSET(int8_t, info.huge(), baseFileName, info));
+ ret.reset(CREATEINTSET(int8_t, baseFileName, info));
break;
case BasicType::INT16:
- ret.reset(CREATEINTSET(int16_t, info.huge(), baseFileName, info));
+ ret.reset(CREATEINTSET(int16_t, baseFileName, info));
break;
case BasicType::INT32:
- ret.reset(CREATEINTSET(int32_t, info.huge(), baseFileName, info));
+ ret.reset(CREATEINTSET(int32_t, baseFileName, info));
break;
case BasicType::INT64:
- ret.reset(CREATEINTSET(int64_t, info.huge(), baseFileName, info));
+ ret.reset(CREATEINTSET(int64_t, baseFileName, info));
break;
case BasicType::FLOAT:
- ret.reset(CREATEFLOATSET(float, info.huge(), baseFileName, info));
+ ret.reset(CREATEFLOATSET(float, baseFileName, info));
break;
case BasicType::DOUBLE:
- ret.reset(CREATEFLOATSET(double, info.huge(), baseFileName, info));
+ ret.reset(CREATEFLOATSET(double, baseFileName, info));
break;
case BasicType::STRING:
- ret.reset(info.huge() ? static_cast<AttributeVector *>(new HugeWeightedSetStringAttribute(baseFileName, info)) : static_cast<AttributeVector *>(new WeightedSetStringAttribute(baseFileName, info)));
+ ret.reset(static_cast<AttributeVector *>(new WeightedSetStringAttribute(baseFileName, info)));
break;
default:
break;
diff --git a/searchlib/src/vespa/searchlib/attribute/defines.h b/searchlib/src/vespa/searchlib/attribute/defines.h
index 355a841c0b9..a7275837349 100644
--- a/searchlib/src/vespa/searchlib/attribute/defines.h
+++ b/searchlib/src/vespa/searchlib/attribute/defines.h
@@ -4,8 +4,8 @@
#define ENUM_ATTRIBUTE(B) EnumAttribute<B>
-#define MULTIVALUE_ARG(T, I) multivalue::MVMTemplateArg<multivalue::Value<T>, I>
-#define MULTIVALUE_ENUM_ARG(I) multivalue::MVMTemplateArg<multivalue::Value<EnumStoreBase::Index>, I>
-#define WEIGHTED_MULTIVALUE_ARG(T, I) multivalue::MVMTemplateArg<multivalue::WeightedValue<T>, I>
-#define WEIGHTED_MULTIVALUE_ENUM_ARG(I) multivalue::MVMTemplateArg<multivalue::WeightedValue<EnumStoreBase::Index>, I>
+#define MULTIVALUE_ARG(T) multivalue::Value<T>
+#define MULTIVALUE_ENUM_ARG multivalue::Value<EnumStoreBase::Index>
+#define WEIGHTED_MULTIVALUE_ARG(T) multivalue::WeightedValue<T>
+#define WEIGHTED_MULTIVALUE_ENUM_ARG multivalue::WeightedValue<EnumStoreBase::Index>
diff --git a/searchlib/src/vespa/searchlib/attribute/flagattribute.cpp b/searchlib/src/vespa/searchlib/attribute/flagattribute.cpp
index f53afa32f40..9a9313a87fb 100644
--- a/searchlib/src/vespa/searchlib/attribute/flagattribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/flagattribute.cpp
@@ -269,6 +269,5 @@ FlagAttributeT<B>::SearchContext::createIterator(fef::TermFieldMatchData *
}
template class FlagAttributeT<FlagBaseImpl>;
-template class FlagAttributeT<HugeFlagBaseImpl>;
}
diff --git a/searchlib/src/vespa/searchlib/attribute/flagattribute.h b/searchlib/src/vespa/searchlib/attribute/flagattribute.h
index 998cc54a44b..f3f90fb4680 100644
--- a/searchlib/src/vespa/searchlib/attribute/flagattribute.h
+++ b/searchlib/src/vespa/searchlib/attribute/flagattribute.h
@@ -7,8 +7,8 @@
namespace search {
-typedef MultiValueNumericAttribute< IntegerAttributeTemplate<int8_t>, multivalue::MVMTemplateArg<multivalue::Value<int8_t>, multivalue::Index32> > FlagBaseImpl;
-typedef MultiValueNumericAttribute< IntegerAttributeTemplate<int8_t>, multivalue::MVMTemplateArg<multivalue::Value<int8_t>, multivalue::Index64> > HugeFlagBaseImpl;
+typedef MultiValueNumericAttribute< IntegerAttributeTemplate<int8_t>, multivalue::Value<int8_t> > FlagBaseImpl;
+typedef MultiValueNumericAttribute< IntegerAttributeTemplate<int8_t>, multivalue::Value<int8_t> > HugeFlagBaseImpl;
template <typename B>
class FlagAttributeT : public B {
diff --git a/searchlib/src/vespa/searchlib/attribute/load_utils.cpp b/searchlib/src/vespa/searchlib/attribute/load_utils.cpp
index 094cddd53c7..f33b6dc5385 100644
--- a/searchlib/src/vespa/searchlib/attribute/load_utils.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/load_utils.cpp
@@ -6,7 +6,6 @@
#include "enumstorebase.h"
#include "loadedenumvalue.h"
#include "multi_value_mapping2.h"
-#include "multivaluemapping.h"
using search::multivalue::Value;
using search::multivalue::WeightedValue;
@@ -15,12 +14,8 @@ namespace search {
namespace attribute {
#define INSTANTIATE_ARRAY(ValueType, Saver) \
-template uint32_t loadFromEnumeratedMultiValue(MultiValueMappingT<multivalue::Value<ValueType>, multivalue::Index32> &, AttributeVector::ReaderBase &, vespalib::ConstArrayRef<ValueType>, Saver); \
-template uint32_t loadFromEnumeratedMultiValue(MultiValueMappingT<multivalue::Value<ValueType>, multivalue::Index64> &, AttributeVector::ReaderBase &, vespalib::ConstArrayRef<ValueType>, Saver); \
template uint32_t loadFromEnumeratedMultiValue(MultiValueMapping2<Value<ValueType>> &, AttributeVector::ReaderBase &, vespalib::ConstArrayRef<ValueType>, Saver)
#define INSTANTIATE_WSET(ValueType, Saver) \
-template uint32_t loadFromEnumeratedMultiValue(MultiValueMappingT<multivalue::WeightedValue<ValueType>, multivalue::Index32> &, AttributeVector::ReaderBase &, vespalib::ConstArrayRef<ValueType>, Saver); \
-template uint32_t loadFromEnumeratedMultiValue(MultiValueMappingT<multivalue::WeightedValue<ValueType>, multivalue::Index64> &, AttributeVector::ReaderBase &, vespalib::ConstArrayRef<ValueType>, Saver); \
template uint32_t loadFromEnumeratedMultiValue(MultiValueMapping2<WeightedValue<ValueType>> &, AttributeVector::ReaderBase &, vespalib::ConstArrayRef<ValueType>, Saver)
#define INSTANTIATE_SINGLE(ValueType, Saver) \
template void loadFromEnumeratedSingleValue(RcuVectorBase<ValueType> &, vespalib::GenerationHolder &, AttributeVector::ReaderBase &, vespalib::ConstArrayRef<ValueType>, Saver)
diff --git a/searchlib/src/vespa/searchlib/attribute/multienumattribute.h b/searchlib/src/vespa/searchlib/attribute/multienumattribute.h
index 9d2e7321131..6696c622489 100644
--- a/searchlib/src/vespa/searchlib/attribute/multienumattribute.h
+++ b/searchlib/src/vespa/searchlib/attribute/multienumattribute.h
@@ -13,7 +13,7 @@ namespace search {
* to store unique values and a multi value mapping to store enum indices for each document.
*
* B: EnumAttribute<BaseClass>
- * M: MultiValueType (MultiValueMapping template argument)
+ * M: MultiValueType
*/
template <typename B, typename M>
class MultiValueEnumAttribute : public MultiValueAttribute<B, M>
diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.h b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.h
index 8135576c8b0..ab8d7944de1 100644
--- a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.h
+++ b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.h
@@ -4,7 +4,6 @@
#include <vespa/searchlib/attribute/integerbase.h>
#include <vespa/searchlib/attribute/floatbase.h>
-#include <vespa/searchlib/attribute/multivaluemapping.h>
#include <vespa/searchlib/attribute/multivalueattribute.h>
#include <vespa/searchlib/attribute/attributeiterators.h>
#include <vespa/searchlib/query/query.h>
@@ -19,7 +18,7 @@ namespace search {
* multi value mapping from MultiValueAttribute.
*
* B: Base class
- * M: MultiValueType (MultiValueMapping template argument)
+ * M: MultiValueType
*/
template <typename B, typename M>
class MultiValueNumericAttribute : public MultiValueAttribute<B, M>
diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.hpp
index 159ced0ee74..9b67b00ee7f 100644
--- a/searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.hpp
@@ -77,7 +77,7 @@ MultiValueNumericPostingAttribute<B, M>::getSearch(QueryTermSimple::UP qTerm,
const AttributeVector::SearchContext::Params & params) const
{
std::unique_ptr<search::AttributeVector::SearchContext> sc;
- sc.reset(new typename std::conditional<M::Value::_hasWeight,
+ sc.reset(new typename std::conditional<M::_hasWeight,
SetPostingSearchContext,
ArrayPostingSearchContext>::
type(std::move(qTerm), params, *this));
diff --git a/searchlib/src/vespa/searchlib/attribute/multistringattribute.cpp b/searchlib/src/vespa/searchlib/attribute/multistringattribute.cpp
index 9ffc62f219d..737f464206e 100644
--- a/searchlib/src/vespa/searchlib/attribute/multistringattribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/multistringattribute.cpp
@@ -8,10 +8,8 @@
LOG_SETUP(".searchlib.attribute.multistringattribute");
namespace search {
-template class MultiValueStringAttributeT<EnumAttribute<StringAttribute>, multivalue::MVMTemplateArg<multivalue::Value<EnumStoreBase::Index>, multivalue::Index32>>;
-template class MultiValueStringAttributeT<EnumAttribute<StringAttribute>, multivalue::MVMTemplateArg<multivalue::WeightedValue<EnumStoreBase::Index>, multivalue::Index32>>;
-template class MultiValueStringAttributeT<EnumAttribute<StringAttribute>, multivalue::MVMTemplateArg<multivalue::Value<EnumStoreBase::Index>, multivalue::Index64>>;
-template class MultiValueStringAttributeT<EnumAttribute<StringAttribute>, multivalue::MVMTemplateArg<multivalue::WeightedValue<EnumStoreBase::Index>, multivalue::Index64>>;
+template class MultiValueStringAttributeT<EnumAttribute<StringAttribute>, multivalue::Value<EnumStoreBase::Index> >;
+template class MultiValueStringAttributeT<EnumAttribute<StringAttribute>, multivalue::WeightedValue<EnumStoreBase::Index> >;
} // namespace search
diff --git a/searchlib/src/vespa/searchlib/attribute/multistringattribute.h b/searchlib/src/vespa/searchlib/attribute/multistringattribute.h
index c4e503de7cc..a4f1887f9a6 100644
--- a/searchlib/src/vespa/searchlib/attribute/multistringattribute.h
+++ b/searchlib/src/vespa/searchlib/attribute/multistringattribute.h
@@ -6,9 +6,9 @@
#include <vespa/searchlib/attribute/enumattribute.h>
#include <vespa/searchlib/attribute/enumstore.h>
#include <vespa/searchlib/attribute/multienumattribute.h>
-#include <vespa/searchlib/attribute/multivaluemapping.h>
#include <vespa/searchlib/attribute/multi_value_mapping2.h>
#include "enumhintsearchcontext.h"
+#include "multivalue.h"
namespace search {
@@ -21,7 +21,6 @@ namespace search {
* B: Base class: EnumAttribute<StringAttribute>
* M: multivalue::Value<EnumStoreBase::Index> (array) or
* multivalue::WeightedValue<EnumStoreBase::Index> (weighted set)
- * M specifies the type stored in the MultiValueMapping
*/
template <typename B, typename M>
class MultiValueStringAttributeT : public MultiValueEnumAttribute<B, M>
@@ -165,10 +164,8 @@ public:
};
-typedef MultiValueStringAttributeT<EnumAttribute<StringAttribute>, multivalue::MVMTemplateArg<multivalue::Value<EnumStoreBase::Index>, multivalue::Index32> > ArrayStringAttribute;
-typedef MultiValueStringAttributeT<EnumAttribute<StringAttribute>, multivalue::MVMTemplateArg<multivalue::WeightedValue<EnumStoreBase::Index>, multivalue::Index32> > WeightedSetStringAttribute;
-typedef MultiValueStringAttributeT<EnumAttribute<StringAttribute>, multivalue::MVMTemplateArg<multivalue::Value<EnumStoreBase::Index>, multivalue::Index64> > HugeArrayStringAttribute;
-typedef MultiValueStringAttributeT<EnumAttribute<StringAttribute>, multivalue::MVMTemplateArg<multivalue::WeightedValue<EnumStoreBase::Index>, multivalue::Index64> > HugeWeightedSetStringAttribute;
+typedef MultiValueStringAttributeT<EnumAttribute<StringAttribute>, multivalue::Value<EnumStoreBase::Index> > ArrayStringAttribute;
+typedef MultiValueStringAttributeT<EnumAttribute<StringAttribute>, multivalue::WeightedValue<EnumStoreBase::Index> > WeightedSetStringAttribute;
} // namespace search
diff --git a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.h b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.h
index 1d89499fa51..fca0c201d3e 100644
--- a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.h
+++ b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.h
@@ -16,7 +16,6 @@ namespace search {
* B: EnumAttribute<StringAttribute>
* T: multivalue::Value<EnumStoreBase::Index> (array) or
* multivalue::WeightedValue<EnumStoreBase::Index> (weighted set)
- * T specifies the type stored in the MultiValueMapping
*/
template <typename B, typename T>
class MultiValueStringPostingAttributeT
@@ -114,10 +113,8 @@ public:
}
};
-typedef MultiValueStringPostingAttributeT<EnumAttribute<StringAttribute>, multivalue::MVMTemplateArg<multivalue::Value<EnumStoreBase::Index>, multivalue::Index32> > ArrayStringPostingAttribute;
-typedef MultiValueStringPostingAttributeT<EnumAttribute<StringAttribute>, multivalue::MVMTemplateArg<multivalue::WeightedValue<EnumStoreBase::Index>, multivalue::Index32> > WeightedSetStringPostingAttribute;
-typedef MultiValueStringPostingAttributeT<EnumAttribute<StringAttribute>, multivalue::MVMTemplateArg<multivalue::Value<EnumStoreBase::Index>, multivalue::Index64> > HugeArrayStringPostingAttribute;
-typedef MultiValueStringPostingAttributeT<EnumAttribute<StringAttribute>, multivalue::MVMTemplateArg<multivalue::WeightedValue<EnumStoreBase::Index>, multivalue::Index64> > HugeWeightedSetStringPostingAttribute;
+typedef MultiValueStringPostingAttributeT<EnumAttribute<StringAttribute>, multivalue::Value<EnumStoreBase::Index> > ArrayStringPostingAttribute;
+typedef MultiValueStringPostingAttributeT<EnumAttribute<StringAttribute>, multivalue::WeightedValue<EnumStoreBase::Index> > WeightedSetStringPostingAttribute;
} // namespace search
diff --git a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp
index 59d2e361691..b29cf272a82 100644
--- a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp
@@ -92,7 +92,7 @@ MultiValueStringPostingAttributeT<B, T>::getSearch(QueryTermSimple::UP qTerm,
const AttributeVector::SearchContext::Params & params) const
{
std::unique_ptr<search::AttributeVector::SearchContext> sc;
- sc.reset(new typename std::conditional<T::Value::_hasWeight,
+ sc.reset(new typename std::conditional<T::_hasWeight,
StringSetPostingSearchContext,
StringArrayPostingSearchContext>::
type(std::move(qTerm), params.useBitVector(), *this));
diff --git a/searchlib/src/vespa/searchlib/attribute/multivalueattribute.h b/searchlib/src/vespa/searchlib/attribute/multivalueattribute.h
index bd76c503998..304f6c9442f 100644
--- a/searchlib/src/vespa/searchlib/attribute/multivalueattribute.h
+++ b/searchlib/src/vespa/searchlib/attribute/multivalueattribute.h
@@ -2,7 +2,6 @@
#pragma once
-#include <vespa/searchlib/attribute/multivaluemapping.h>
#include "multi_value_mapping2.h"
#include <vespa/vespalib/stllike/string.h>
#include "attributevector.h"
@@ -13,7 +12,7 @@ namespace search {
* Implementation of multi value attribute using an underlying multi value mapping
*
* B: Base class
- * M: MultiValueType (MultiValueMapping template argument)
+ * M: MultiValueType
*/
template <typename B, typename M>
class MultiValueAttribute : public B
@@ -24,7 +23,7 @@ protected:
typedef typename B::ChangeVector ChangeVector;
typedef typename B::ChangeVector::const_iterator ChangeVectorIterator;
- typedef typename M::Value MultiValueType;
+ using MultiValueType = M;
using MultiValueMapping = attribute::MultiValueMapping2<MultiValueType>;
using Histogram = attribute::MultiValueMapping2Base::Histogram;
typedef typename MultiValueType::ValueType ValueType;
diff --git a/searchlib/src/vespa/searchlib/attribute/postingchange.cpp b/searchlib/src/vespa/searchlib/attribute/postingchange.cpp
index a5dd469b02e..f39bef2a8fc 100644
--- a/searchlib/src/vespa/searchlib/attribute/postingchange.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/postingchange.cpp
@@ -2,7 +2,7 @@
#include <vespa/fastos/fastos.h>
#include "postingchange.h"
-#include "multivaluemapping.h"
+#include "multivalue.h"
#include "multi_value_mapping2.h"
#include "postinglistattribute.h"
#include <vespa/searchlib/common/bitvector.h>
@@ -345,46 +345,18 @@ typedef EnumStoreBase::Index EnumIndex;
typedef multivalue::WeightedValue<EnumIndex> WeightedIndex;
typedef multivalue::Value<EnumIndex> ValueIndex;
-typedef MultiValueMappingT<WeightedIndex, multivalue::Index32> NormalWeightedMultiValueMapping;
-typedef MultiValueMappingT<WeightedIndex, multivalue::Index64> HugeWeightedMultiValueMapping;
using WeightedMultiValueMapping2 = attribute::MultiValueMapping2<WeightedIndex>;
-typedef MultiValueMappingT<ValueIndex, multivalue::Index32> NormalValueMultiValueMapping;
-typedef MultiValueMappingT<ValueIndex, multivalue::Index64> HugeValueMultiValueMapping;
using ValueMultiValueMapping2 = attribute::MultiValueMapping2<ValueIndex>;
typedef std::vector<std::pair<uint32_t, std::vector<WeightedIndex>>> DocIndicesWeighted;
typedef std::vector<std::pair<uint32_t, std::vector<ValueIndex>>> DocIndicesValue;
template WeightedPostingChangeMap PostingChangeComputerT<WeightedIndex, WeightedPostingChangeMap>
- ::compute<NormalWeightedMultiValueMapping>(const NormalWeightedMultiValueMapping &,
- const DocIndicesWeighted &,
- const EnumStoreComparator &,
- const EnumIndexMapper &);
-
-template WeightedPostingChangeMap PostingChangeComputerT<WeightedIndex, WeightedPostingChangeMap>
- ::compute<HugeWeightedMultiValueMapping>(const HugeWeightedMultiValueMapping &,
- const DocIndicesWeighted &,
- const EnumStoreComparator &,
- const EnumIndexMapper &);
-
-template WeightedPostingChangeMap PostingChangeComputerT<WeightedIndex, WeightedPostingChangeMap>
::compute<WeightedMultiValueMapping2>(const WeightedMultiValueMapping2 &,
const DocIndicesWeighted &,
const EnumStoreComparator &,
const EnumIndexMapper &);
template WeightedPostingChangeMap PostingChangeComputerT<ValueIndex, WeightedPostingChangeMap>
- ::compute<NormalValueMultiValueMapping>(const NormalValueMultiValueMapping &,
- const DocIndicesValue &,
- const EnumStoreComparator &,
- const EnumIndexMapper &);
-
-template WeightedPostingChangeMap PostingChangeComputerT<ValueIndex, WeightedPostingChangeMap>
- ::compute<HugeValueMultiValueMapping>(const HugeValueMultiValueMapping &,
- const DocIndicesValue &,
- const EnumStoreComparator &,
- const EnumIndexMapper &);
-
-template WeightedPostingChangeMap PostingChangeComputerT<ValueIndex, WeightedPostingChangeMap>
::compute<ValueMultiValueMapping2>(const ValueMultiValueMapping2 &,
const DocIndicesValue &,
const EnumStoreComparator &,