aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-04-08 18:19:12 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2021-04-08 18:19:12 +0000
commit5ba2affbe9980d3ae72857c0534c39929fc8b2a7 (patch)
treec35a4d026f789fafea55a3658ebe73eb44b72aca /searchlib
parent674c9f643f874c43a23ee2800fe61857b53a0e5c (diff)
Use consistent naming
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enumstore.cpp10
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enumstore.h4
2 files changed, 9 insertions, 5 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/enumstore.cpp b/searchlib/src/vespa/searchlib/attribute/enumstore.cpp
index 836084e3da0..3a008557676 100644
--- a/searchlib/src/vespa/searchlib/attribute/enumstore.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/enumstore.cpp
@@ -42,17 +42,21 @@ EnumStoreT<const char*>::load_unique_value(const void* src,
}
std::unique_ptr<vespalib::datastore::IUniqueStoreDictionary>
-make_enum_store_dictionary(IEnumStore &store, bool has_postings, const search::DictionaryConfig & dict_cfg, std::unique_ptr<vespalib::datastore::EntryComparator> compare, std::unique_ptr<vespalib::datastore::EntryComparator> folded_compare)
+make_enum_store_dictionary(IEnumStore &store, bool has_postings, const search::DictionaryConfig & dict_cfg,
+ std::unique_ptr<vespalib::datastore::EntryComparator> compare,
+ std::unique_ptr<vespalib::datastore::EntryComparator> folded_compare)
{
+ using NoBTreeDictionary = vespalib::datastore::NoBTreeDictionary;
+ using ShardedHashMap = vespalib::datastore::ShardedHashMap;
if (has_postings) {
if (folded_compare) {
return std::make_unique<EnumStoreFoldedDictionary>(store, std::move(compare), std::move(folded_compare));
} else {
switch (dict_cfg.getType()) {
case search::DictionaryConfig::Type::HASH:
- return std::make_unique<EnumStoreDictionary<vespalib::datastore::NoBTreeDictionary, vespalib::datastore::ShardedHashMap>>(store, std::move(compare));
+ return std::make_unique<EnumStoreDictionary<NoBTreeDictionary, ShardedHashMap>>(store, std::move(compare));
case search::DictionaryConfig::Type::BTREE_AND_HASH:
- return std::make_unique<EnumStoreDictionary<EnumPostingTree, vespalib::datastore::ShardedHashMap>>(store, std::move(compare));
+ return std::make_unique<EnumStoreDictionary<EnumPostingTree, ShardedHashMap>>(store, std::move(compare));
default:
return std::make_unique<EnumStoreDictionary<EnumPostingTree>>(store, std::move(compare));
}
diff --git a/searchlib/src/vespa/searchlib/attribute/enumstore.h b/searchlib/src/vespa/searchlib/attribute/enumstore.h
index 5fd1e9867e9..4f5454c15b2 100644
--- a/searchlib/src/vespa/searchlib/attribute/enumstore.h
+++ b/searchlib/src/vespa/searchlib/attribute/enumstore.h
@@ -74,7 +74,7 @@ private:
ssize_t load_unique_value(const void* src, size_t available, Index& idx);
public:
- EnumStoreT(bool has_postings, const search::DictionaryConfig & type);
+ EnumStoreT(bool has_postings, const search::DictionaryConfig & dict_cfg);
~EnumStoreT() override;
uint32_t get_ref_count(Index idx) const { return get_entry_base(idx).get_ref_count(); }
@@ -212,7 +212,7 @@ public:
};
std::unique_ptr<vespalib::datastore::IUniqueStoreDictionary>
-make_enum_store_dictionary(IEnumStore &store, bool has_postings, const search::DictionaryConfig & type,
+make_enum_store_dictionary(IEnumStore &store, bool has_postings, const search::DictionaryConfig & dict_cfg,
std::unique_ptr<vespalib::datastore::EntryComparator> compare,
std::unique_ptr<vespalib::datastore::EntryComparator> folded_compare);