summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/apps/tests/btreestress_test.cpp2
-rw-r--r--searchlib/src/tests/attribute/attribute_test.cpp8
-rw-r--r--searchlib/src/tests/attribute/enum_comparator/enum_comparator_test.cpp6
-rw-r--r--searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp2
-rw-r--r--searchlib/src/tests/attribute/posting_list_merger/posting_list_merger_test.cpp2
-rw-r--r--searchlib/src/tests/attribute/postinglist/postinglist.cpp24
-rw-r--r--searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp4
-rw-r--r--searchlib/src/tests/attribute/stringattribute/stringattribute_test.cpp2
-rw-r--r--searchlib/src/tests/memoryindex/compact_words_store/compact_words_store_test.cpp2
-rw-r--r--searchlib/src/tests/memoryindex/datastore/feature_store_test.cpp4
-rw-r--r--searchlib/src/tests/memoryindex/datastore/word_store_test.cpp2
-rw-r--r--searchlib/src/tests/memoryindex/field_index/field_index_test.cpp4
-rw-r--r--searchlib/src/tests/memoryindex/field_index_remover/field_index_remover_test.cpp6
-rw-r--r--searchlib/src/tests/predicate/predicate_bounds_posting_list_test.cpp2
-rw-r--r--searchlib/src/tests/predicate/predicate_index_test.cpp2
-rw-r--r--searchlib/src/tests/predicate/predicate_interval_posting_list_test.cpp2
-rw-r--r--searchlib/src/tests/predicate/predicate_zstar_compressed_posting_list_test.cpp2
-rw-r--r--searchlib/src/tests/predicate/simple_index_test.cpp10
-rw-r--r--searchlib/src/vespa/searchlib/attribute/attributeiterators.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/attributeiterators.h2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/diversity.h2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/dociditerator.h6
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enum_store_dictionary.cpp42
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enum_store_dictionary.h48
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enum_store_types.h4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enumattributesaver.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enumcomparator.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enumcomparator.h12
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enumhintsearchcontext.cpp8
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enumhintsearchcontext.h6
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enumstore.cpp10
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enumstore.h26
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enumstore.hpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/i_document_weight_attribute.h8
-rw-r--r--searchlib/src/vespa/searchlib/attribute/i_enum_store.h6
-rw-r--r--searchlib/src/vespa/searchlib/attribute/i_enum_store_dictionary.h26
-rw-r--r--searchlib/src/vespa/searchlib/attribute/imported_search_context.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/loadedvalue.h4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multi_value_mapping.h8
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multi_value_mapping.hpp6
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multi_value_mapping_base.h2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multienumattribute.hpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multienumattributesaver.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multinumericattributesaver.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.h4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.hpp8
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multistringpostattribute.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multistringpostattribute.h4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp10
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multivalueattribute.hpp4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/posting_list_merger.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/posting_list_merger.h2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/posting_list_traverser.h2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postingchange.cpp18
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postingchange.h8
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postingdata.h4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postinglistattribute.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postinglistattribute.h12
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.cpp14
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.h14
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.hpp8
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postinglisttraits.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postinglisttraits.h24
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postingstore.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postingstore.h16
-rw-r--r--searchlib/src/vespa/searchlib/attribute/reference.h2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/reference_attribute.h12
-rw-r--r--searchlib/src/vespa/searchlib/attribute/reference_attribute_saver.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/reference_attribute_saver.h2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/reference_mappings.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/reference_mappings.h10
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.h4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.hpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.h4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.hpp2
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/compact_words_store.cpp8
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/compact_words_store.h16
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/feature_store.cpp18
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/feature_store.h28
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/field_index.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/field_index.h12
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/field_index_base.h14
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/field_index_remover.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/field_index_remover.h6
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/i_field_index_insert_listener.h2
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/i_ordered_field_index_inserter.h2
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/ordered_field_index_inserter.cpp10
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/ordered_field_index_inserter.h2
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/posting_iterator.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/posting_list_entry.h8
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/word_store.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/word_store.h8
-rw-r--r--searchlib/src/vespa/searchlib/predicate/common.h2
-rw-r--r--searchlib/src/vespa/searchlib/predicate/document_features_store.cpp8
-rw-r--r--searchlib/src/vespa/searchlib/predicate/document_features_store.h12
-rw-r--r--searchlib/src/vespa/searchlib/predicate/predicate_index.cpp12
-rw-r--r--searchlib/src/vespa/searchlib/predicate/predicate_index.h12
-rw-r--r--searchlib/src/vespa/searchlib/predicate/predicate_interval_store.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/predicate/predicate_interval_store.h14
-rw-r--r--searchlib/src/vespa/searchlib/predicate/simple_index.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/predicate/simple_index.h28
-rw-r--r--searchlib/src/vespa/searchlib/predicate/simple_index.hpp24
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/predicate_blueprint.cpp10
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/predicate_blueprint.h10
-rw-r--r--searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/tensor/dense_tensor_store.h10
-rw-r--r--searchlib/src/vespa/searchlib/tensor/generic_tensor_store.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/tensor/generic_tensor_store.h8
-rw-r--r--searchlib/src/vespa/searchlib/tensor/hnsw_graph.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/tensor/hnsw_graph.h10
-rw-r--r--searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/tensor/hnsw_index.h4
-rw-r--r--searchlib/src/vespa/searchlib/tensor/hnsw_index_saver.h2
-rw-r--r--searchlib/src/vespa/searchlib/tensor/tensor_store.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/tensor/tensor_store.h6
-rw-r--r--searchlib/src/vespa/searchlib/test/fakedata/fakememtreeocc.h2
-rw-r--r--searchlib/src/vespa/searchlib/test/memoryindex/ordered_field_index_inserter.h2
-rw-r--r--searchlib/src/vespa/searchlib/test/memoryindex/wrap_inserter.h2
120 files changed, 449 insertions, 449 deletions
diff --git a/searchlib/src/apps/tests/btreestress_test.cpp b/searchlib/src/apps/tests/btreestress_test.cpp
index a39416c2227..0fb356001f2 100644
--- a/searchlib/src/apps/tests/btreestress_test.cpp
+++ b/searchlib/src/apps/tests/btreestress_test.cpp
@@ -24,7 +24,7 @@
#include <vespa/log/log.h>
LOG_SETUP("btreestress_test");
-using MyTree = search::btree::BTree<uint32_t, uint32_t>;
+using MyTree = vespalib::btree::BTree<uint32_t, uint32_t>;
using MyTreeIterator = typename MyTree::Iterator;
using MyTreeConstIterator = typename MyTree::ConstIterator;
using GenerationHandler = vespalib::GenerationHandler;
diff --git a/searchlib/src/tests/attribute/attribute_test.cpp b/searchlib/src/tests/attribute/attribute_test.cpp
index 4715292f86a..b4267f45d6b 100644
--- a/searchlib/src/tests/attribute/attribute_test.cpp
+++ b/searchlib/src/tests/attribute/attribute_test.cpp
@@ -1640,7 +1640,7 @@ AttributeTest::testStatus()
// No posting list
static constexpr size_t LeafNodeSize = 4 + sizeof(IEnumStore::Index) * EnumTreeTraits::LEAF_SLOTS;
static constexpr size_t InternalNodeSize =
- 8 + (sizeof(IEnumStore::Index) + sizeof(datastore::EntryRef)) * EnumTreeTraits::INTERNAL_SLOTS;
+ 8 + (sizeof(IEnumStore::Index) + sizeof(vespalib::datastore::EntryRef)) * EnumTreeTraits::INTERNAL_SLOTS;
static constexpr size_t NestedVectorSize = 24; // sizeof(vespalib::Array)
{
@@ -1659,7 +1659,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(datastore::EntryRef) + 100 * 4;
+ expUsed += 100 * sizeof(vespalib::datastore::EntryRef) + 100 * 4;
EXPECT_GREATER_EQUAL(ptr->getStatus().getUsed(), expUsed);
EXPECT_GREATER_EQUAL(ptr->getStatus().getAllocated(), expUsed);
}
@@ -1683,7 +1683,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(datastore::EntryRef) + numDocs * numValuesPerDoc * sizeof(IEnumStore::Index) + ((numValuesPerDoc > 1024) ? numDocs * NestedVectorSize : 0);
+ expUsed += numDocs * sizeof(vespalib::datastore::EntryRef) + numDocs * numValuesPerDoc * sizeof(IEnumStore::Index) + ((numValuesPerDoc > 1024) ? numDocs * NestedVectorSize : 0);
EXPECT_GREATER_EQUAL(ptr->getStatus().getUsed(), expUsed);
EXPECT_GREATER_EQUAL(ptr->getStatus().getAllocated(), expUsed);
}
@@ -2059,7 +2059,7 @@ get_default_value_ref_count(AttributeVector &attr)
auto &enum_store = dynamic_cast<EnumStoreT<int32_t> &>(*enum_store_base);
IAttributeVector::EnumHandle default_value_handle(0);
if (enum_store.find_enum(attr.getDefaultValue(), default_value_handle)) {
- datastore::EntryRef default_value_ref(default_value_handle);
+ vespalib::datastore::EntryRef default_value_ref(default_value_handle);
assert(default_value_ref.valid());
return enum_store.get_ref_count(default_value_ref);
} else {
diff --git a/searchlib/src/tests/attribute/enum_comparator/enum_comparator_test.cpp b/searchlib/src/tests/attribute/enum_comparator/enum_comparator_test.cpp
index f3082e858a3..4e1e1c6d792 100644
--- a/searchlib/src/tests/attribute/enum_comparator/enum_comparator_test.cpp
+++ b/searchlib/src/tests/attribute/enum_comparator/enum_comparator_test.cpp
@@ -9,7 +9,7 @@
#include <vespa/log/log.h>
LOG_SETUP("enum_comparator_test");
-using namespace search::btree;
+using namespace vespalib::btree;
namespace search {
@@ -20,8 +20,8 @@ using StringEnumStore = EnumStoreT<const char*>;
using EnumIndex = IEnumStore::Index;
using TreeType = BTreeRoot<EnumIndex, BTreeNoLeafData,
- btree::NoAggregated,
- const datastore::EntryComparatorWrapper>;
+ vespalib::btree::NoAggregated,
+ const vespalib::datastore::EntryComparatorWrapper>;
using NodeAllocator = TreeType::NodeAllocatorType;
class Test : public vespalib::TestApp {
diff --git a/searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp b/searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp
index a936ba124ee..2bb55ac6977 100644
--- a/searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp
+++ b/searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp
@@ -12,7 +12,7 @@
#include <vespa/log/log.h>
LOG_SETUP("multivaluemapping_test");
-using search::datastore::ArrayStoreConfig;
+using vespalib::datastore::ArrayStoreConfig;
template <typename EntryT>
void
diff --git a/searchlib/src/tests/attribute/posting_list_merger/posting_list_merger_test.cpp b/searchlib/src/tests/attribute/posting_list_merger/posting_list_merger_test.cpp
index 6ee3eeaccba..99b22e02e2e 100644
--- a/searchlib/src/tests/attribute/posting_list_merger/posting_list_merger_test.cpp
+++ b/searchlib/src/tests/attribute/posting_list_merger/posting_list_merger_test.cpp
@@ -5,7 +5,7 @@
#include <vespa/vespalib/test/insertion_operators.h>
#include <algorithm>
-using search::btree::BTreeNoLeafData;
+using vespalib::btree::BTreeNoLeafData;
using search::attribute::PostingListMerger;
struct Posting {
diff --git a/searchlib/src/tests/attribute/postinglist/postinglist.cpp b/searchlib/src/tests/attribute/postinglist/postinglist.cpp
index 37d76e4a9e8..751fa72c349 100644
--- a/searchlib/src/tests/attribute/postinglist/postinglist.cpp
+++ b/searchlib/src/tests/attribute/postinglist/postinglist.cpp
@@ -96,18 +96,18 @@ private:
std::vector<RandomValue> _randomValues;
public:
- typedef datastore::DataStore<int> IntKeyStore;
- typedef btree::BTreeKeyData<uint32_t, btree::BTreeNoLeafData>
+ typedef vespalib::datastore::DataStore<int> IntKeyStore;
+ typedef vespalib::btree::BTreeKeyData<uint32_t, vespalib::btree::BTreeNoLeafData>
AttributePosting;
- typedef btree::BTreeStore<uint32_t,
- btree::BTreeNoLeafData,
- btree::NoAggregated,
+ typedef vespalib::btree::BTreeStore<uint32_t,
+ vespalib::btree::BTreeNoLeafData,
+ vespalib::btree::NoAggregated,
std::less<uint32_t>,
- btree::BTreeDefaultTraits>
+ vespalib::btree::BTreeDefaultTraits>
PostingList;
typedef PostingList::NodeAllocatorType PostingListNodeAllocator;
- typedef datastore::EntryRef PostingIdx;
- typedef datastore::EntryRef StoreIndex;
+ typedef vespalib::datastore::EntryRef PostingIdx;
+ typedef vespalib::datastore::EntryRef StoreIndex;
class IntComp {
private:
@@ -127,8 +127,8 @@ public:
}
};
- typedef btree::BTreeRoot<StoreIndex, PostingIdx,
- btree::NoAggregated,
+ typedef vespalib::btree::BTreeRoot<StoreIndex, PostingIdx,
+ vespalib::btree::NoAggregated,
const IntComp &> IntEnumTree;
typedef IntEnumTree::NodeAllocatorType IntEnumNodeAllocator;
typedef IntEnumTree Tree;
@@ -375,7 +375,7 @@ insertRandomValues(Tree &tree,
PostingIdx oldIdx = itr.getData();
PostingIdx newIdx = oldIdx;
AttributePosting newPosting(i->_docId,
- btree::BTreeNoLeafData());
+ vespalib::btree::BTreeNoLeafData());
std::vector<AttributePosting> additions;
std::vector<uint32_t> removals;
additions.push_back(newPosting);
@@ -591,7 +591,7 @@ AttributePostingListTest::doCompactEnumStore(Tree &tree,
std::vector<uint32_t> toHold;
for (uint32_t bufferId = 0; bufferId < numBuffers; ++bufferId) {
- datastore::BufferState &state = valueHandle.getBufferState(bufferId);
+ vespalib::datastore::BufferState &state = valueHandle.getBufferState(bufferId);
if (state.isActive()) {
toHold.push_back(bufferId);
// Freelists already disabled due to variable sized data
diff --git a/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp b/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp
index 0bb10bcdbe6..3e849ba6c4e 100644
--- a/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp
+++ b/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp
@@ -458,7 +458,7 @@ PostingListAttributeTest::checkPostingList(const VectorType & vec, const std::ve
ASSERT_TRUE(itr.valid());
typename VectorType::PostingList::Iterator postings;
- postings = postingList.begin(datastore::EntryRef(itr.getData()));
+ postings = postingList.begin(vespalib::datastore::EntryRef(itr.getData()));
uint32_t doc = docBegin;
uint32_t numHits(0);
@@ -677,7 +677,7 @@ PostingListAttributeTest::checkPostingList(AttributeType & vec, ValueType value,
ASSERT_TRUE(itr.valid());
typename AttributeType::PostingList::Iterator postings;
- postings = postingList.begin(datastore::EntryRef(itr.getData()));
+ postings = postingList.begin(vespalib::datastore::EntryRef(itr.getData()));
DocSet::iterator docBegin = expected.begin();
DocSet::iterator docEnd = expected.end();
diff --git a/searchlib/src/tests/attribute/stringattribute/stringattribute_test.cpp b/searchlib/src/tests/attribute/stringattribute/stringattribute_test.cpp
index a9c6cd1fd6c..a4b218e73e0 100644
--- a/searchlib/src/tests/attribute/stringattribute/stringattribute_test.cpp
+++ b/searchlib/src/tests/attribute/stringattribute/stringattribute_test.cpp
@@ -19,7 +19,7 @@ namespace search {
using attribute::CollectionType;
using attribute::IAttributeVector;
-using datastore::EntryRef;
+using vespalib::datastore::EntryRef;
class StringAttributeTest : public vespalib::TestApp
{
diff --git a/searchlib/src/tests/memoryindex/compact_words_store/compact_words_store_test.cpp b/searchlib/src/tests/memoryindex/compact_words_store/compact_words_store_test.cpp
index 52c85a70160..6f2e52f7a4f 100644
--- a/searchlib/src/tests/memoryindex/compact_words_store/compact_words_store_test.cpp
+++ b/searchlib/src/tests/memoryindex/compact_words_store/compact_words_store_test.cpp
@@ -9,7 +9,7 @@
#include <map>
using namespace search;
-using namespace search::datastore;
+using namespace vespalib::datastore;
using namespace search::memoryindex;
using vespalib::MemoryUsage;
diff --git a/searchlib/src/tests/memoryindex/datastore/feature_store_test.cpp b/searchlib/src/tests/memoryindex/datastore/feature_store_test.cpp
index c6368bee6eb..1eb9890cf2e 100644
--- a/searchlib/src/tests/memoryindex/datastore/feature_store_test.cpp
+++ b/searchlib/src/tests/memoryindex/datastore/feature_store_test.cpp
@@ -6,8 +6,8 @@
#include <vespa/log/log.h>
LOG_SETUP("feature_store_test");
-using namespace search::btree;
-using namespace search::datastore;
+using namespace vespalib::btree;
+using namespace vespalib::datastore;
using namespace search::index;
using search::index::schema::CollectionType;
diff --git a/searchlib/src/tests/memoryindex/datastore/word_store_test.cpp b/searchlib/src/tests/memoryindex/datastore/word_store_test.cpp
index 86365287b29..9ab5cc685e2 100644
--- a/searchlib/src/tests/memoryindex/datastore/word_store_test.cpp
+++ b/searchlib/src/tests/memoryindex/datastore/word_store_test.cpp
@@ -5,7 +5,7 @@
#include <vespa/log/log.h>
LOG_SETUP("word_store_test");
-using namespace search::datastore;
+using namespace vespalib::datastore;
namespace search::memoryindex {
diff --git a/searchlib/src/tests/memoryindex/field_index/field_index_test.cpp b/searchlib/src/tests/memoryindex/field_index/field_index_test.cpp
index 9347e99f6c2..ee42d68a495 100644
--- a/searchlib/src/tests/memoryindex/field_index/field_index_test.cpp
+++ b/searchlib/src/tests/memoryindex/field_index/field_index_test.cpp
@@ -25,8 +25,8 @@
#include <vespa/log/log.h>
LOG_SETUP("field_index_test");
-using namespace search::btree;
-using namespace search::datastore;
+using namespace vespalib::btree;
+using namespace vespalib::datastore;
namespace search {
diff --git a/searchlib/src/tests/memoryindex/field_index_remover/field_index_remover_test.cpp b/searchlib/src/tests/memoryindex/field_index_remover/field_index_remover_test.cpp
index f11df42f6b1..af7ea9be481 100644
--- a/searchlib/src/tests/memoryindex/field_index_remover/field_index_remover_test.cpp
+++ b/searchlib/src/tests/memoryindex/field_index_remover/field_index_remover_test.cpp
@@ -60,7 +60,7 @@ struct MockRemoveListener : public IFieldIndexRemoveListener {
struct FieldIndexRemoverTest : public ::testing::Test {
MockRemoveListener _listener;
std::vector<std::unique_ptr<WordStore>> _wordStores;
- std::vector<std::map<vespalib::string, datastore::EntryRef>> _wordToRefMaps;
+ std::vector<std::map<vespalib::string, vespalib::datastore::EntryRef>> _wordToRefMaps;
std::vector<std::unique_ptr<FieldIndexRemover>> _removers;
FieldIndexRemoverTest()
@@ -77,12 +77,12 @@ struct FieldIndexRemoverTest : public ::testing::Test {
}
_wordToRefMaps.resize(numFields);
}
- datastore::EntryRef getWordRef(const vespalib::string &word, uint32_t fieldId) {
+ vespalib::datastore::EntryRef getWordRef(const vespalib::string &word, uint32_t fieldId) {
auto &wordToRefMap = _wordToRefMaps[fieldId];
WordStore &wordStore = *_wordStores[fieldId];
auto itr = wordToRefMap.find(word);
if (itr == wordToRefMap.end()) {
- datastore::EntryRef ref = wordStore.addWord(word);
+ vespalib::datastore::EntryRef ref = wordStore.addWord(word);
wordToRefMap[word] = ref;
return ref;
}
diff --git a/searchlib/src/tests/predicate/predicate_bounds_posting_list_test.cpp b/searchlib/src/tests/predicate/predicate_bounds_posting_list_test.cpp
index 7c77dc1883c..915b5404e95 100644
--- a/searchlib/src/tests/predicate/predicate_bounds_posting_list_test.cpp
+++ b/searchlib/src/tests/predicate/predicate_bounds_posting_list_test.cpp
@@ -29,7 +29,7 @@ const uint64_t hash = 0x123;
TEST("require that empty bounds posting list starts at 0.") {
PredicateIndex index(generation_handler, generation_holder, limit_provider, config, 8);
- datastore::EntryRef ref;
+ vespalib::datastore::EntryRef ref;
PredicateBoundsPostingList<PredicateIndex::BTreeIterator>
posting_list(index.getIntervalStore(),
index.getBoundsIndex().getBTreePostingList(ref), 42);
diff --git a/searchlib/src/tests/predicate/predicate_index_test.cpp b/searchlib/src/tests/predicate/predicate_index_test.cpp
index 12bc192079a..199670d929f 100644
--- a/searchlib/src/tests/predicate/predicate_index_test.cpp
+++ b/searchlib/src/tests/predicate/predicate_index_test.cpp
@@ -239,7 +239,7 @@ void checkAllIntervals(Iterator posting_it, IntervalT expected_interval,
for (uint32_t id = 1; id < 100u; ++id) {
ASSERT_TRUE(posting_it.valid());
EXPECT_EQUAL(id, posting_it.getKey());
- datastore::EntryRef ref = posting_it.getData();
+ vespalib::datastore::EntryRef ref = posting_it.getData();
ASSERT_TRUE(ref.valid());
uint32_t size;
IntervalT single;
diff --git a/searchlib/src/tests/predicate/predicate_interval_posting_list_test.cpp b/searchlib/src/tests/predicate/predicate_interval_posting_list_test.cpp
index d91d50bdc8f..e27b01975f0 100644
--- a/searchlib/src/tests/predicate/predicate_interval_posting_list_test.cpp
+++ b/searchlib/src/tests/predicate/predicate_interval_posting_list_test.cpp
@@ -28,7 +28,7 @@ const uint64_t hash = 0x123;
TEST("require that empty posting list starts at 0.") {
PredicateIndex index(generation_handler, generation_holder, limit_provider, config, 8);
- datastore::EntryRef ref;
+ vespalib::datastore::EntryRef ref;
PredicateIntervalPostingList<PredicateIndex::BTreeIterator>
posting_list(index.getIntervalStore(), index.getIntervalIndex().getBTreePostingList(ref));
EXPECT_EQUAL(0u, posting_list.getDocId());
diff --git a/searchlib/src/tests/predicate/predicate_zstar_compressed_posting_list_test.cpp b/searchlib/src/tests/predicate/predicate_zstar_compressed_posting_list_test.cpp
index 2e5001a1adb..737be77a61e 100644
--- a/searchlib/src/tests/predicate/predicate_zstar_compressed_posting_list_test.cpp
+++ b/searchlib/src/tests/predicate/predicate_zstar_compressed_posting_list_test.cpp
@@ -29,7 +29,7 @@ const uint64_t hash = 0x123;
TEST("require that empty posting list starts at 0.") {
PredicateIndex index(generation_handler, generation_holder, limit_provider, config, 8);
- datastore::EntryRef ref;
+ vespalib::datastore::EntryRef ref;
PredicateZstarCompressedPostingList<PredicateIndex::BTreeIterator>
posting_list(index.getIntervalStore(), index.getIntervalIndex().getBTreePostingList(ref));
EXPECT_EQUAL(0u, posting_list.getDocId());
diff --git a/searchlib/src/tests/predicate/simple_index_test.cpp b/searchlib/src/tests/predicate/simple_index_test.cpp
index 84495dbdbe2..c5177c526c0 100644
--- a/searchlib/src/tests/predicate/simple_index_test.cpp
+++ b/searchlib/src/tests/predicate/simple_index_test.cpp
@@ -98,7 +98,7 @@ struct Fixture {
SimpleIndex<MyData>::VectorIterator getVectorPostingList(uint64_t k) {
return *_index.getVectorPostingList(k);
}
- SimpleIndex<MyData>::BTreeIterator getBTreePostingList(datastore::EntryRef ref) {
+ SimpleIndex<MyData>::BTreeIterator getBTreePostingList(vespalib::datastore::EntryRef ref) {
return _index.getBTreePostingList(ref);
}
void commit() {
@@ -112,7 +112,7 @@ TEST_F("require that SimpleIndex can insert and remove a value.", Fixture) {
f.commit();
auto it = f.lookup(key);
ASSERT_TRUE(it.valid());
- datastore::EntryRef ref = it.getData();
+ vespalib::datastore::EntryRef ref = it.getData();
auto posting_it = f.getBTreePostingList(ref);
ASSERT_TRUE(posting_it.valid());
EXPECT_EQUAL(doc_id, posting_it.getKey());
@@ -137,7 +137,7 @@ TEST_F("require that SimpleIndex can insert and remove many values.", Fixture) {
f.commit();
auto it = f.lookup(key);
ASSERT_TRUE(it.valid());
- datastore::EntryRef ref = it.getData();
+ vespalib::datastore::EntryRef ref = it.getData();
auto posting_it = f.getBTreePostingList(ref);
for (size_t id = 1; id < 100; ++id) {
ASSERT_TRUE(posting_it.valid());
@@ -181,7 +181,7 @@ TEST_FF("require that SimpleIndex can be serialized and deserialized.", Fixture,
auto it = f2.lookup(key);
ASSERT_TRUE(it.valid());
- datastore::EntryRef ref = it.getData();
+ vespalib::datastore::EntryRef ref = it.getData();
auto posting_it = f1.getBTreePostingList(ref);
for (uint32_t id = 1; id < 100; ++id) {
ASSERT_TRUE(posting_it.valid());
@@ -202,7 +202,7 @@ TEST_F("require that SimpleIndex can update by inserting the same key twice.", F
auto it = f.lookup(key);
ASSERT_TRUE(it.valid());
- datastore::EntryRef ref = it.getData();
+ vespalib::datastore::EntryRef ref = it.getData();
auto posting_it = f.getBTreePostingList(ref);
ASSERT_TRUE(posting_it.valid());
EXPECT_EQUAL(doc_id, posting_it.getKey());
diff --git a/searchlib/src/vespa/searchlib/attribute/attributeiterators.cpp b/searchlib/src/vespa/searchlib/attribute/attributeiterators.cpp
index ea3b4c2f32d..abcd8da9056 100644
--- a/searchlib/src/vespa/searchlib/attribute/attributeiterators.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/attributeiterators.cpp
@@ -93,7 +93,7 @@ AttributePostingListIteratorT<WeightedInnerAttributePostingListIterator>::
setupPostingInfo()
{
if (_iterator.valid()) {
- const btree::MinMaxAggregated &a(_iterator.getAggregated());
+ const vespalib::btree::MinMaxAggregated &a(_iterator.getAggregated());
_postingInfo = MinMaxPostingInfo(a.getMin(), a.getMax());
_postingInfoValid = true;
}
@@ -116,7 +116,7 @@ AttributePostingListIteratorT<DocIdMinMaxIterator<AttributeWeightPosting> >::
setupPostingInfo()
{
if (_iterator.valid()) {
- const btree::MinMaxAggregated a(_iterator.getAggregated());
+ const vespalib::btree::MinMaxAggregated a(_iterator.getAggregated());
_postingInfo = MinMaxPostingInfo(a.getMin(), a.getMax());
_postingInfoValid = true;
}
diff --git a/searchlib/src/vespa/searchlib/attribute/attributeiterators.h b/searchlib/src/vespa/searchlib/attribute/attributeiterators.h
index 6d304b61663..5d6499ea9aa 100644
--- a/searchlib/src/vespa/searchlib/attribute/attributeiterators.h
+++ b/searchlib/src/vespa/searchlib/attribute/attributeiterators.h
@@ -199,7 +199,7 @@ public:
};
-using InnerAttributePostingListIterator = attribute::PostingListTraits<btree::BTreeNoLeafData>::const_iterator;
+using InnerAttributePostingListIterator = attribute::PostingListTraits<vespalib::btree::BTreeNoLeafData>::const_iterator;
using WeightedInnerAttributePostingListIterator = attribute::PostingListTraits<int32_t>::const_iterator;
diff --git a/searchlib/src/vespa/searchlib/attribute/diversity.h b/searchlib/src/vespa/searchlib/attribute/diversity.h
index e42ad04ceb6..6e3c6cfff00 100644
--- a/searchlib/src/vespa/searchlib/attribute/diversity.h
+++ b/searchlib/src/vespa/searchlib/attribute/diversity.h
@@ -100,7 +100,7 @@ void diversify_2(const DictRange &range_in, const PostingStore &posting, Diversi
using KeyDataType = typename PostingStore::KeyDataType;
while (range.has_next() && (result.size() < filter.getMaxTotal())) {
typename DictRange::Next dict_entry(range);
- posting.foreach_frozen(datastore::EntryRef(dict_entry.get().getData()),
+ posting.foreach_frozen(vespalib::datastore::EntryRef(dict_entry.get().getData()),
[&](uint32_t key, const DataType &data)
{ recorder.push_back(KeyDataType(key, data)); });
if (fragments.back() < result.size()) {
diff --git a/searchlib/src/vespa/searchlib/attribute/dociditerator.h b/searchlib/src/vespa/searchlib/attribute/dociditerator.h
index 0e336dc634f..261dff77ddb 100644
--- a/searchlib/src/vespa/searchlib/attribute/dociditerator.h
+++ b/searchlib/src/vespa/searchlib/attribute/dociditerator.h
@@ -80,15 +80,15 @@ public:
DocIdMinMaxIterator()
: DocIdIterator<P>()
{ }
- inline btree::MinMaxAggregated getAggregated() const { return btree::MinMaxAggregated(1, 1); }
+ inline vespalib::btree::MinMaxAggregated getAggregated() const { return vespalib::btree::MinMaxAggregated(1, 1); }
};
template<>
-inline btree::MinMaxAggregated
+inline vespalib::btree::MinMaxAggregated
DocIdMinMaxIterator<AttributeWeightPosting>::getAggregated() const
{
- btree::MinMaxAggregated a;
+ vespalib::btree::MinMaxAggregated a;
for (const AttributeWeightPosting *cur = _cur, *end = _end; cur != end; ++cur) {
a.add(cur->getData());
}
diff --git a/searchlib/src/vespa/searchlib/attribute/enum_store_dictionary.cpp b/searchlib/src/vespa/searchlib/attribute/enum_store_dictionary.cpp
index 4f82697aaec..19d30317c7b 100644
--- a/searchlib/src/vespa/searchlib/attribute/enum_store_dictionary.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/enum_store_dictionary.cpp
@@ -14,18 +14,18 @@
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.attribute.enum_store_dictionary");
-using search::datastore::EntryComparator;
-using search::datastore::EntryRef;
-using search::datastore::UniqueStoreAddResult;
+using vespalib::datastore::EntryComparator;
+using vespalib::datastore::EntryRef;
+using vespalib::datastore::UniqueStoreAddResult;
namespace search {
-using btree::BTreeNode;
+using vespalib::btree::BTreeNode;
template <typename DictionaryT>
void
EnumStoreDictionary<DictionaryT>::remove_unused_values(const IndexSet& unused,
- const datastore::EntryComparator& cmp)
+ const vespalib::datastore::EntryComparator& cmp)
{
if (unused.empty()) {
return;
@@ -54,7 +54,7 @@ EnumStoreDictionary<DictionaryT>::set_ref_counts(const EnumVector& hist)
template <typename DictionaryT>
void
-EnumStoreDictionary<DictionaryT>::free_unused_values(const datastore::EntryComparator& cmp)
+EnumStoreDictionary<DictionaryT>::free_unused_values(const vespalib::datastore::EntryComparator& cmp)
{
IndexSet unused;
@@ -68,7 +68,7 @@ EnumStoreDictionary<DictionaryT>::free_unused_values(const datastore::EntryCompa
template <typename DictionaryT>
void
EnumStoreDictionary<DictionaryT>::free_unused_values(const IndexSet& to_remove,
- const datastore::EntryComparator& cmp)
+ const vespalib::datastore::EntryComparator& cmp)
{
IndexSet unused;
for (const auto& index : to_remove) {
@@ -92,7 +92,7 @@ EnumStoreDictionary<DictionaryT>::remove(const EntryComparator &comp, EntryRef r
template <typename DictionaryT>
bool
-EnumStoreDictionary<DictionaryT>::find_index(const datastore::EntryComparator& cmp,
+EnumStoreDictionary<DictionaryT>::find_index(const vespalib::datastore::EntryComparator& cmp,
Index& idx) const
{
auto itr = this->_dict.find(Index(), cmp);
@@ -105,7 +105,7 @@ EnumStoreDictionary<DictionaryT>::find_index(const datastore::EntryComparator& c
template <typename DictionaryT>
bool
-EnumStoreDictionary<DictionaryT>::find_frozen_index(const datastore::EntryComparator& cmp,
+EnumStoreDictionary<DictionaryT>::find_frozen_index(const vespalib::datastore::EntryComparator& cmp,
Index& idx) const
{
auto itr = this->_dict.getFrozenView().find(Index(), cmp);
@@ -118,7 +118,7 @@ EnumStoreDictionary<DictionaryT>::find_frozen_index(const datastore::EntryCompar
template <typename DictionaryT>
std::vector<IEnumStore::EnumHandle>
-EnumStoreDictionary<DictionaryT>::find_matching_enums(const datastore::EntryComparator& cmp) const
+EnumStoreDictionary<DictionaryT>::find_matching_enums(const vespalib::datastore::EntryComparator& cmp) const
{
std::vector<IEnumStore::EnumHandle> result;
auto itr = this->_dict.getFrozenView().find(Index(), cmp);
@@ -213,7 +213,7 @@ template class EnumStoreDictionary<EnumPostingTree>;
}
-namespace search::btree {
+namespace vespalib::btree {
using search::IEnumStore;
using search::EnumTreeTraits;
@@ -252,19 +252,19 @@ class BTreeNodeStore<IEnumStore::Index, uint32_t, NoAggregated,
template
class BTreeRoot<IEnumStore::Index, BTreeNoLeafData, NoAggregated,
- const datastore::EntryComparatorWrapper, EnumTreeTraits>;
+ const vespalib::datastore::EntryComparatorWrapper, EnumTreeTraits>;
template
class BTreeRoot<IEnumStore::Index, uint32_t, NoAggregated,
- const datastore::EntryComparatorWrapper, EnumTreeTraits>;
+ const vespalib::datastore::EntryComparatorWrapper, EnumTreeTraits>;
template
class BTreeRootT<IEnumStore::Index, BTreeNoLeafData, NoAggregated,
- const datastore::EntryComparatorWrapper, EnumTreeTraits>;
+ const vespalib::datastore::EntryComparatorWrapper, EnumTreeTraits>;
template
class BTreeRootT<IEnumStore::Index, uint32_t, NoAggregated,
- const datastore::EntryComparatorWrapper, EnumTreeTraits>;
+ const vespalib::datastore::EntryComparatorWrapper, EnumTreeTraits>;
template
class BTreeRootBase<IEnumStore::Index, BTreeNoLeafData, NoAggregated,
@@ -290,23 +290,23 @@ class BTreeIteratorBase<IEnumStore::Index, uint32_t, NoAggregated,
EnumTreeTraits::INTERNAL_SLOTS, EnumTreeTraits::LEAF_SLOTS, EnumTreeTraits::PATH_SIZE>;
template class BTreeConstIterator<IEnumStore::Index, BTreeNoLeafData, NoAggregated,
- const datastore::EntryComparatorWrapper, EnumTreeTraits>;
+ const vespalib::datastore::EntryComparatorWrapper, EnumTreeTraits>;
template class BTreeConstIterator<IEnumStore::Index, uint32_t, NoAggregated,
- const datastore::EntryComparatorWrapper, EnumTreeTraits>;
+ const vespalib::datastore::EntryComparatorWrapper, EnumTreeTraits>;
template
class BTreeIterator<IEnumStore::Index, BTreeNoLeafData, NoAggregated,
- const datastore::EntryComparatorWrapper, EnumTreeTraits>;
+ const vespalib::datastore::EntryComparatorWrapper, EnumTreeTraits>;
template
class BTreeIterator<IEnumStore::Index, uint32_t, NoAggregated,
- const datastore::EntryComparatorWrapper, EnumTreeTraits>;
+ const vespalib::datastore::EntryComparatorWrapper, EnumTreeTraits>;
template
class BTree<IEnumStore::Index, BTreeNoLeafData, NoAggregated,
- const datastore::EntryComparatorWrapper, EnumTreeTraits>;
+ const vespalib::datastore::EntryComparatorWrapper, EnumTreeTraits>;
template
class BTree<IEnumStore::Index, uint32_t, NoAggregated,
- const datastore::EntryComparatorWrapper, EnumTreeTraits>;
+ const vespalib::datastore::EntryComparatorWrapper, EnumTreeTraits>;
}
diff --git a/searchlib/src/vespa/searchlib/attribute/enum_store_dictionary.h b/searchlib/src/vespa/searchlib/attribute/enum_store_dictionary.h
index ce4542cc132..336a7c79e65 100644
--- a/searchlib/src/vespa/searchlib/attribute/enum_store_dictionary.h
+++ b/searchlib/src/vespa/searchlib/attribute/enum_store_dictionary.h
@@ -13,19 +13,19 @@ class IEnumStore;
* Concrete dictionary for an enum store that extends the functionality of a unique store dictionary.
*/
template <typename DictionaryT>
-class EnumStoreDictionary : public datastore::UniqueStoreDictionary<DictionaryT, IEnumStoreDictionary> {
+class EnumStoreDictionary : public vespalib::datastore::UniqueStoreDictionary<DictionaryT, IEnumStoreDictionary> {
private:
using EnumVector = IEnumStoreDictionary::EnumVector;
using Index = IEnumStoreDictionary::Index;
using IndexSet = IEnumStoreDictionary::IndexSet;
using IndexVector = IEnumStoreDictionary::IndexVector;
- using ParentUniqueStoreDictionary = datastore::UniqueStoreDictionary<DictionaryT, IEnumStoreDictionary>;
+ using ParentUniqueStoreDictionary = vespalib::datastore::UniqueStoreDictionary<DictionaryT, IEnumStoreDictionary>;
using generation_t = IEnumStoreDictionary::generation_t;
IEnumStore& _enumStore;
void remove_unused_values(const IndexSet& unused,
- const datastore::EntryComparator& cmp);
+ const vespalib::datastore::EntryComparator& cmp);
public:
EnumStoreDictionary(IEnumStore& enumStore);
@@ -36,16 +36,16 @@ public:
void set_ref_counts(const EnumVector& hist) override;
- void free_unused_values(const datastore::EntryComparator& cmp) override;
+ void free_unused_values(const vespalib::datastore::EntryComparator& cmp) override;
void free_unused_values(const IndexSet& to_remove,
- const datastore::EntryComparator& cmp) override;
+ const vespalib::datastore::EntryComparator& cmp) override;
- void remove(const datastore::EntryComparator& comp, datastore::EntryRef ref) override;
- bool find_index(const datastore::EntryComparator& cmp, Index& idx) const override;
- bool find_frozen_index(const datastore::EntryComparator& cmp, Index& idx) const override;
+ void remove(const vespalib::datastore::EntryComparator& comp, vespalib::datastore::EntryRef ref) override;
+ bool find_index(const vespalib::datastore::EntryComparator& cmp, Index& idx) const override;
+ bool find_frozen_index(const vespalib::datastore::EntryComparator& cmp, Index& idx) const override;
std::vector<attribute::IAttributeVector::EnumHandle>
- find_matching_enums(const datastore::EntryComparator& cmp) const override;
+ find_matching_enums(const vespalib::datastore::EntryComparator& cmp) const override;
EnumPostingTree& get_posting_dictionary() override;
const EnumPostingTree& get_posting_dictionary() const override;
@@ -63,18 +63,18 @@ public:
class EnumStoreFoldedDictionary : public EnumStoreDictionary<EnumPostingTree>
{
private:
- std::unique_ptr<datastore::EntryComparator> _folded_compare;
+ std::unique_ptr<vespalib::datastore::EntryComparator> _folded_compare;
public:
- EnumStoreFoldedDictionary(IEnumStore& enumStore, std::unique_ptr<datastore::EntryComparator> folded_compare);
+ EnumStoreFoldedDictionary(IEnumStore& enumStore, std::unique_ptr<vespalib::datastore::EntryComparator> folded_compare);
~EnumStoreFoldedDictionary() override;
- datastore::UniqueStoreAddResult add(const datastore::EntryComparator& comp, std::function<datastore::EntryRef(void)> insertEntry) override;
- void remove(const datastore::EntryComparator& comp, datastore::EntryRef ref) override;
+ vespalib::datastore::UniqueStoreAddResult add(const vespalib::datastore::EntryComparator& comp, std::function<vespalib::datastore::EntryRef(void)> insertEntry) override;
+ void remove(const vespalib::datastore::EntryComparator& comp, vespalib::datastore::EntryRef ref) override;
};
}
-namespace search::btree {
+namespace vespalib::btree {
extern template
class BTreeNodeT<search::IEnumStore::Index, search::EnumTreeTraits::INTERNAL_SLOTS>;
@@ -110,19 +110,19 @@ class BTreeNodeStore<search::IEnumStore::Index, uint32_t, NoAggregated,
extern template
class BTreeRoot<search::IEnumStore::Index, BTreeNoLeafData, NoAggregated,
- const datastore::EntryComparatorWrapper, search::EnumTreeTraits>;
+ const vespalib::datastore::EntryComparatorWrapper, search::EnumTreeTraits>;
extern template
class BTreeRoot<search::IEnumStore::Index, uint32_t, NoAggregated,
- const datastore::EntryComparatorWrapper, search::EnumTreeTraits>;
+ const vespalib::datastore::EntryComparatorWrapper, search::EnumTreeTraits>;
extern template
class BTreeRootT<search::IEnumStore::Index, BTreeNoLeafData, NoAggregated,
- const datastore::EntryComparatorWrapper, search::EnumTreeTraits>;
+ const vespalib::datastore::EntryComparatorWrapper, search::EnumTreeTraits>;
extern template
class BTreeRootT<search::IEnumStore::Index, uint32_t, NoAggregated,
- const datastore::EntryComparatorWrapper, search::EnumTreeTraits>;
+ const vespalib::datastore::EntryComparatorWrapper, search::EnumTreeTraits>;
extern template
class BTreeRootBase<search::IEnumStore::Index, BTreeNoLeafData, NoAggregated,
@@ -149,23 +149,23 @@ class BTreeIteratorBase<search::IEnumStore::Index, uint32_t, NoAggregated,
search::EnumTreeTraits::INTERNAL_SLOTS, search::EnumTreeTraits::LEAF_SLOTS, search::EnumTreeTraits::PATH_SIZE>;
extern template class BTreeConstIterator<search::IEnumStore::Index, BTreeNoLeafData, NoAggregated,
- const datastore::EntryComparatorWrapper, search::EnumTreeTraits>;
+ const vespalib::datastore::EntryComparatorWrapper, search::EnumTreeTraits>;
extern template class BTreeConstIterator<search::IEnumStore::Index, uint32_t, NoAggregated,
- const datastore::EntryComparatorWrapper, search::EnumTreeTraits>;
+ const vespalib::datastore::EntryComparatorWrapper, search::EnumTreeTraits>;
extern template
class BTreeIterator<search::IEnumStore::Index, BTreeNoLeafData, NoAggregated,
- const datastore::EntryComparatorWrapper, search::EnumTreeTraits>;
+ const vespalib::datastore::EntryComparatorWrapper, search::EnumTreeTraits>;
extern template
class BTreeIterator<search::IEnumStore::Index, uint32_t, NoAggregated,
- const datastore::EntryComparatorWrapper, search::EnumTreeTraits>;
+ const vespalib::datastore::EntryComparatorWrapper, search::EnumTreeTraits>;
extern template
class BTree<search::IEnumStore::Index, BTreeNoLeafData, NoAggregated,
- const datastore::EntryComparatorWrapper, search::EnumTreeTraits>;
+ const vespalib::datastore::EntryComparatorWrapper, search::EnumTreeTraits>;
extern template
class BTree<search::IEnumStore::Index, uint32_t, NoAggregated,
- const datastore::EntryComparatorWrapper, search::EnumTreeTraits>;
+ const vespalib::datastore::EntryComparatorWrapper, search::EnumTreeTraits>;
}
diff --git a/searchlib/src/vespa/searchlib/attribute/enum_store_types.h b/searchlib/src/vespa/searchlib/attribute/enum_store_types.h
index ffc5754da5d..22f70e67549 100644
--- a/searchlib/src/vespa/searchlib/attribute/enum_store_types.h
+++ b/searchlib/src/vespa/searchlib/attribute/enum_store_types.h
@@ -8,8 +8,8 @@
namespace search::enumstore {
-using Index = datastore::EntryRef;
-using InternalIndex = datastore::EntryRefT<22>;
+using Index = vespalib::datastore::EntryRef;
+using InternalIndex = vespalib::datastore::EntryRefT<22>;
using IndexVector = vespalib::Array<Index>;
using EnumHandle = attribute::IAttributeVector::EnumHandle;
using EnumVector = vespalib::Array<uint32_t>;
diff --git a/searchlib/src/vespa/searchlib/attribute/enumattributesaver.cpp b/searchlib/src/vespa/searchlib/attribute/enumattributesaver.cpp
index e59fb48cd93..059e5defeb7 100644
--- a/searchlib/src/vespa/searchlib/attribute/enumattributesaver.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/enumattributesaver.cpp
@@ -24,7 +24,7 @@ EnumAttributeSaver::writeUdat(IAttributeSaveTarget &saveTarget)
{
if (saveTarget.getEnumerated()) {
auto udatWriter = saveTarget.udatWriter().allocBufferWriter();
- _enumerator->foreach_key([&](datastore::EntryRef idx){
+ _enumerator->foreach_key([&](vespalib::datastore::EntryRef idx){
_enumStore.write_value(*udatWriter, idx);
});
udatWriter->flush();
@@ -33,7 +33,7 @@ EnumAttributeSaver::writeUdat(IAttributeSaveTarget &saveTarget)
} // namespace search
-namespace search::datastore {
+namespace vespalib::datastore {
template class UniqueStoreEnumerator<search::IEnumStore::InternalIndex>;
diff --git a/searchlib/src/vespa/searchlib/attribute/enumcomparator.cpp b/searchlib/src/vespa/searchlib/attribute/enumcomparator.cpp
index 67c9a7dc585..115eaa90841 100644
--- a/searchlib/src/vespa/searchlib/attribute/enumcomparator.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/enumcomparator.cpp
@@ -28,8 +28,8 @@ template <typename EntryT>
bool
EnumStoreComparator<EntryT>::equal(const EntryT& lhs, const EntryT& rhs)
{
- return !datastore::UniqueStoreComparatorHelper<EntryT>::less(lhs, rhs) &&
- !datastore::UniqueStoreComparatorHelper<EntryT>::less(rhs, lhs);
+ return !vespalib::datastore::UniqueStoreComparatorHelper<EntryT>::less(lhs, rhs) &&
+ !vespalib::datastore::UniqueStoreComparatorHelper<EntryT>::less(rhs, lhs);
}
EnumStoreStringComparator::EnumStoreStringComparator(const DataStoreType& data_store)
diff --git a/searchlib/src/vespa/searchlib/attribute/enumcomparator.h b/searchlib/src/vespa/searchlib/attribute/enumcomparator.h
index a86534d7843..aaf47987a5d 100644
--- a/searchlib/src/vespa/searchlib/attribute/enumcomparator.h
+++ b/searchlib/src/vespa/searchlib/attribute/enumcomparator.h
@@ -13,9 +13,9 @@ namespace search {
* Less-than comparator used for comparing values of type EntryT stored in an enum store.
*/
template <typename EntryT>
-class EnumStoreComparator : public datastore::UniqueStoreComparator<EntryT, IEnumStore::InternalIndex> {
+class EnumStoreComparator : public vespalib::datastore::UniqueStoreComparator<EntryT, IEnumStore::InternalIndex> {
public:
- using ParentType = datastore::UniqueStoreComparator<EntryT, IEnumStore::InternalIndex>;
+ using ParentType = vespalib::datastore::UniqueStoreComparator<EntryT, IEnumStore::InternalIndex>;
using DataStoreType = typename ParentType::DataStoreType;
EnumStoreComparator(const DataStoreType& data_store, const EntryT& fallback_value, bool prefix = false);
@@ -30,9 +30,9 @@ public:
* The input string values are first folded, then compared.
* If they are equal, then it falls back to comparing without folding.
*/
-class EnumStoreStringComparator : public datastore::UniqueStoreStringComparator<IEnumStore::InternalIndex> {
+class EnumStoreStringComparator : public vespalib::datastore::UniqueStoreStringComparator<IEnumStore::InternalIndex> {
protected:
- using ParentType = datastore::UniqueStoreStringComparator<IEnumStore::InternalIndex>;
+ using ParentType = vespalib::datastore::UniqueStoreStringComparator<IEnumStore::InternalIndex>;
using DataStoreType = ParentType::DataStoreType;
using ParentType::get;
@@ -51,7 +51,7 @@ public:
return compare(lhs, rhs) == 0;
}
- bool operator() (const datastore::EntryRef lhs, const datastore::EntryRef rhs) const override {
+ bool operator() (const vespalib::datastore::EntryRef lhs, const vespalib::datastore::EntryRef rhs) const override {
return compare(get(lhs), get(rhs)) < 0;
}
};
@@ -95,7 +95,7 @@ public:
return compare_folded(lhs, rhs) == 0;
}
- bool operator() (const datastore::EntryRef lhs, const datastore::EntryRef rhs) const override {
+ bool operator() (const vespalib::datastore::EntryRef lhs, const vespalib::datastore::EntryRef rhs) const override {
if (use_prefix()) {
return compare_folded_prefix(get(lhs), get(rhs), _prefix_len) < 0;
}
diff --git a/searchlib/src/vespa/searchlib/attribute/enumhintsearchcontext.cpp b/searchlib/src/vespa/searchlib/attribute/enumhintsearchcontext.cpp
index 3b9f3d6f47c..4c803d6e158 100644
--- a/searchlib/src/vespa/searchlib/attribute/enumhintsearchcontext.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/enumhintsearchcontext.cpp
@@ -6,7 +6,7 @@
namespace search::attribute {
using queryeval::SearchIterator;
-using btree::BTreeNode;
+using vespalib::btree::BTreeNode;
using fef::TermFieldMatchData;
EnumHintSearchContext::
@@ -25,15 +25,15 @@ EnumHintSearchContext::~EnumHintSearchContext() = default;
void
-EnumHintSearchContext::lookupTerm(const datastore::EntryComparator &comp)
+EnumHintSearchContext::lookupTerm(const vespalib::datastore::EntryComparator &comp)
{
_uniqueValues = _dict_snapshot->count(comp);
}
void
-EnumHintSearchContext::lookupRange(const datastore::EntryComparator &low,
- const datastore::EntryComparator &high)
+EnumHintSearchContext::lookupRange(const vespalib::datastore::EntryComparator &low,
+ const vespalib::datastore::EntryComparator &high)
{
_uniqueValues = _dict_snapshot->count_in_range(low, high);
}
diff --git a/searchlib/src/vespa/searchlib/attribute/enumhintsearchcontext.h b/searchlib/src/vespa/searchlib/attribute/enumhintsearchcontext.h
index 9ec6b0842f6..f649754e0fe 100644
--- a/searchlib/src/vespa/searchlib/attribute/enumhintsearchcontext.h
+++ b/searchlib/src/vespa/searchlib/attribute/enumhintsearchcontext.h
@@ -6,7 +6,7 @@
#include "ipostinglistsearchcontext.h"
#include <vespa/searchlib/queryeval/searchiterator.h>
-namespace search::datastore { class EntryComparator; }
+namespace vespalib::datastore { class EntryComparator; }
namespace search::attribute {
@@ -28,8 +28,8 @@ protected:
uint64_t numValues);
~EnumHintSearchContext() override;
- void lookupTerm(const datastore::EntryComparator &comp);
- void lookupRange(const datastore::EntryComparator &low, const datastore::EntryComparator &high);
+ void lookupTerm(const vespalib::datastore::EntryComparator &comp);
+ void lookupRange(const vespalib::datastore::EntryComparator &low, const vespalib::datastore::EntryComparator &high);
queryeval::SearchIterator::UP
createPostingIterator(fef::TermFieldMatchData *matchData, bool strict) override;
diff --git a/searchlib/src/vespa/searchlib/attribute/enumstore.cpp b/searchlib/src/vespa/searchlib/attribute/enumstore.cpp
index df6756039eb..74e277b2859 100644
--- a/searchlib/src/vespa/searchlib/attribute/enumstore.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/enumstore.cpp
@@ -40,8 +40,8 @@ EnumStoreT<const char*>::load_unique_value(const void* src,
return sz;
}
-std::unique_ptr<datastore::IUniqueStoreDictionary>
-make_enum_store_dictionary(IEnumStore &store, bool has_postings, std::unique_ptr<datastore::EntryComparator> folded_compare)
+std::unique_ptr<vespalib::datastore::IUniqueStoreDictionary>
+make_enum_store_dictionary(IEnumStore &store, bool has_postings, std::unique_ptr<vespalib::datastore::EntryComparator> folded_compare)
{
if (has_postings) {
if (folded_compare) {
@@ -56,20 +56,20 @@ make_enum_store_dictionary(IEnumStore &store, bool has_postings, std::unique_ptr
}
-namespace search::datastore {
+namespace vespalib::datastore {
template class DataStoreT<search::IEnumStore::InternalIndex>;
}
-namespace search::btree {
+namespace vespalib::btree {
template
class BTreeBuilder<search::IEnumStore::Index, BTreeNoLeafData, NoAggregated,
search::EnumTreeTraits::INTERNAL_SLOTS, search::EnumTreeTraits::LEAF_SLOTS>;
template
-class BTreeBuilder<search::IEnumStore::Index, datastore::EntryRef, NoAggregated,
+class BTreeBuilder<search::IEnumStore::Index, vespalib::datastore::EntryRef, NoAggregated,
search::EnumTreeTraits::INTERNAL_SLOTS, search::EnumTreeTraits::LEAF_SLOTS>;
}
diff --git a/searchlib/src/vespa/searchlib/attribute/enumstore.h b/searchlib/src/vespa/searchlib/attribute/enumstore.h
index 4d3630117f9..42738b44461 100644
--- a/searchlib/src/vespa/searchlib/attribute/enumstore.h
+++ b/searchlib/src/vespa/searchlib/attribute/enumstore.h
@@ -25,7 +25,7 @@ namespace search {
/**
* Class storing and providing access to all unique values stored in an enumerated attribute vector.
*
- * It uses an instance of datastore::UniqueStore to store the actual values.
+ * It uses an instance of vespalib::datastore::UniqueStore to store the actual values.
* It also exposes the dictionary used for fast lookups into the set of unique values.
*
* @tparam EntryType The type of the entries/values stored.
@@ -38,15 +38,15 @@ public:
EnumStoreStringComparator,
EnumStoreComparator<EntryT>>;
using AllocatorType = std::conditional_t<std::is_same_v<EntryT, const char *>,
- datastore::UniqueStoreStringAllocator<InternalIndex>,
- datastore::UniqueStoreAllocator<EntryT, InternalIndex>>;
- using UniqueStoreType = datastore::UniqueStore<EntryT, InternalIndex, ComparatorType, AllocatorType>;
+ vespalib::datastore::UniqueStoreStringAllocator<InternalIndex>,
+ vespalib::datastore::UniqueStoreAllocator<EntryT, InternalIndex>>;
+ using UniqueStoreType = vespalib::datastore::UniqueStore<EntryT, InternalIndex, ComparatorType, AllocatorType>;
using FoldedComparatorType = std::conditional_t<std::is_same_v<EntryT, const char *>,
EnumStoreFoldedStringComparator,
ComparatorType>;
using EntryType = EntryT;
using EnumStoreType = EnumStoreT<EntryT>;
- using EntryRef = datastore::EntryRef;
+ using EntryRef = vespalib::datastore::EntryRef;
using generation_t = vespalib::GenerationHandler::generation_t;
private:
@@ -60,7 +60,7 @@ private:
void free_value_if_unused(Index idx, IndexSet &unused) override;
- const datastore::UniqueStoreEntryBase& get_entry_base(Index idx) const {
+ const vespalib::datastore::UniqueStoreEntryBase& get_entry_base(Index idx) const {
return _store.get_allocator().get_wrapped(idx);
}
@@ -113,12 +113,12 @@ public:
class NonEnumeratedLoader {
private:
AllocatorType& _allocator;
- datastore::IUniqueStoreDictionary& _dict;
+ vespalib::datastore::IUniqueStoreDictionary& _dict;
std::vector<EntryRef> _refs;
std::vector<uint32_t> _payloads;
public:
- NonEnumeratedLoader(AllocatorType& allocator, datastore::IUniqueStoreDictionary& dict)
+ NonEnumeratedLoader(AllocatorType& allocator, vespalib::datastore::IUniqueStoreDictionary& dict)
: _allocator(allocator),
_dict(dict),
_refs(),
@@ -211,8 +211,8 @@ public:
std::unique_ptr<Enumerator> make_enumerator() const override;
};
-std::unique_ptr<datastore::IUniqueStoreDictionary>
-make_enum_store_dictionary(IEnumStore &store, bool has_postings, std::unique_ptr<datastore::EntryComparator> folded_compare);
+std::unique_ptr<vespalib::datastore::IUniqueStoreDictionary>
+make_enum_store_dictionary(IEnumStore &store, bool has_postings, std::unique_ptr<vespalib::datastore::EntryComparator> folded_compare);
template <>
@@ -227,20 +227,20 @@ EnumStoreT<const char*>::load_unique_value(const void* src,
}
-namespace search::datastore {
+namespace vespalib::datastore {
extern template
class DataStoreT<search::IEnumStore::Index>;
}
-namespace search::btree {
+namespace vespalib::btree {
extern template
class BTreeBuilder<search::IEnumStore::Index, BTreeNoLeafData, NoAggregated,
search::EnumTreeTraits::INTERNAL_SLOTS, search::EnumTreeTraits::LEAF_SLOTS>;
extern template
-class BTreeBuilder<search::IEnumStore::Index, datastore::EntryRef, NoAggregated,
+class BTreeBuilder<search::IEnumStore::Index, vespalib::datastore::EntryRef, NoAggregated,
search::EnumTreeTraits::INTERNAL_SLOTS, search::EnumTreeTraits::LEAF_SLOTS>;
}
diff --git a/searchlib/src/vespa/searchlib/attribute/enumstore.hpp b/searchlib/src/vespa/searchlib/attribute/enumstore.hpp
index b76cf0c4192..54c756ee437 100644
--- a/searchlib/src/vespa/searchlib/attribute/enumstore.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/enumstore.hpp
@@ -81,7 +81,7 @@ EnumStoreT<EntryT>::EnumStoreT(bool has_postings)
_store.set_dictionary(make_enum_store_dictionary(*this, has_postings,
(has_string_type() ?
std::make_unique<FoldedComparatorType>(_store.get_data_store()) :
- std::unique_ptr<datastore::EntryComparator>())));
+ std::unique_ptr<vespalib::datastore::EntryComparator>())));
_dict = static_cast<IEnumStoreDictionary*>(&_store.get_dictionary());
}
diff --git a/searchlib/src/vespa/searchlib/attribute/i_document_weight_attribute.h b/searchlib/src/vespa/searchlib/attribute/i_document_weight_attribute.h
index dc0a92c4a4f..ed184a7370e 100644
--- a/searchlib/src/vespa/searchlib/attribute/i_document_weight_attribute.h
+++ b/searchlib/src/vespa/searchlib/attribute/i_document_weight_attribute.h
@@ -13,17 +13,17 @@ using DocumentWeightIterator = attribute::PostingListTraits<int32_t>::const_iter
struct IDocumentWeightAttribute
{
struct LookupResult {
- const datastore::EntryRef posting_idx;
+ const vespalib::datastore::EntryRef posting_idx;
const uint32_t posting_size;
const int32_t min_weight;
const int32_t max_weight;
LookupResult() : posting_idx(), posting_size(0), min_weight(0), max_weight(0) {}
- LookupResult(datastore::EntryRef posting_idx_in, uint32_t posting_size_in, int32_t min_weight_in, int32_t max_weight_in)
+ LookupResult(vespalib::datastore::EntryRef posting_idx_in, uint32_t posting_size_in, int32_t min_weight_in, int32_t max_weight_in)
: posting_idx(posting_idx_in), posting_size(posting_size_in), min_weight(min_weight_in), max_weight(max_weight_in) {}
};
virtual LookupResult lookup(const vespalib::string &term) const = 0;
- virtual void create(datastore::EntryRef idx, std::vector<DocumentWeightIterator> &dst) const = 0;
- virtual DocumentWeightIterator create(datastore::EntryRef idx) const = 0;
+ virtual void create(vespalib::datastore::EntryRef idx, std::vector<DocumentWeightIterator> &dst) const = 0;
+ virtual DocumentWeightIterator create(vespalib::datastore::EntryRef idx) const = 0;
virtual ~IDocumentWeightAttribute() {}
};
diff --git a/searchlib/src/vespa/searchlib/attribute/i_enum_store.h b/searchlib/src/vespa/searchlib/attribute/i_enum_store.h
index 63b778f60ab..9819ae81c15 100644
--- a/searchlib/src/vespa/searchlib/attribute/i_enum_store.h
+++ b/searchlib/src/vespa/searchlib/attribute/i_enum_store.h
@@ -13,7 +13,7 @@
#include <cassert>
#include <set>
-namespace search::datastore {
+namespace vespalib::datastore {
class DataStoreBase;
@@ -37,8 +37,8 @@ public:
using IndexVector = enumstore::IndexVector;
using EnumHandle = enumstore::EnumHandle;
using EnumVector = enumstore::EnumVector;
- using EnumIndexRemapper = datastore::UniqueStoreRemapper<InternalIndex>;
- using Enumerator = datastore::UniqueStoreEnumerator<IEnumStore::InternalIndex>;
+ using EnumIndexRemapper = vespalib::datastore::UniqueStoreRemapper<InternalIndex>;
+ using Enumerator = vespalib::datastore::UniqueStoreEnumerator<IEnumStore::InternalIndex>;
struct CompareEnumIndex {
using Index = IEnumStore::Index;
diff --git a/searchlib/src/vespa/searchlib/attribute/i_enum_store_dictionary.h b/searchlib/src/vespa/searchlib/attribute/i_enum_store_dictionary.h
index a7784036a54..974872f3c51 100644
--- a/searchlib/src/vespa/searchlib/attribute/i_enum_store_dictionary.h
+++ b/searchlib/src/vespa/searchlib/attribute/i_enum_store_dictionary.h
@@ -11,22 +11,22 @@ namespace search {
class BufferWriter;
-using EnumTreeTraits = btree::BTreeTraits<16, 16, 10, true>;
+using EnumTreeTraits = vespalib::btree::BTreeTraits<16, 16, 10, true>;
-using EnumTree = btree::BTree<IEnumStore::Index, btree::BTreeNoLeafData,
- btree::NoAggregated,
- const datastore::EntryComparatorWrapper,
+using EnumTree = vespalib::btree::BTree<IEnumStore::Index, vespalib::btree::BTreeNoLeafData,
+ vespalib::btree::NoAggregated,
+ const vespalib::datastore::EntryComparatorWrapper,
EnumTreeTraits>;
-using EnumPostingTree = btree::BTree<IEnumStore::Index, uint32_t,
- btree::NoAggregated,
- const datastore::EntryComparatorWrapper,
+using EnumPostingTree = vespalib::btree::BTree<IEnumStore::Index, uint32_t,
+ vespalib::btree::NoAggregated,
+ const vespalib::datastore::EntryComparatorWrapper,
EnumTreeTraits>;
/**
* Interface for the dictionary used by an enum store.
*/
-class IEnumStoreDictionary : public datastore::IUniqueStoreDictionary {
+class IEnumStoreDictionary : public vespalib::datastore::IUniqueStoreDictionary {
public:
using EnumVector = IEnumStore::EnumVector;
using Index = IEnumStore::Index;
@@ -38,13 +38,13 @@ public:
virtual ~IEnumStoreDictionary() = default;
virtual void set_ref_counts(const EnumVector& hist) = 0;
- virtual void free_unused_values(const datastore::EntryComparator& cmp) = 0;
+ virtual void free_unused_values(const vespalib::datastore::EntryComparator& cmp) = 0;
virtual void free_unused_values(const IndexSet& to_remove,
- const datastore::EntryComparator& cmp) = 0;
- virtual bool find_index(const datastore::EntryComparator& cmp, Index& idx) const = 0;
- virtual bool find_frozen_index(const datastore::EntryComparator& cmp, Index& idx) const = 0;
+ const vespalib::datastore::EntryComparator& cmp) = 0;
+ virtual bool find_index(const vespalib::datastore::EntryComparator& cmp, Index& idx) const = 0;
+ virtual bool find_frozen_index(const vespalib::datastore::EntryComparator& cmp, Index& idx) const = 0;
virtual std::vector<attribute::IAttributeVector::EnumHandle>
- find_matching_enums(const datastore::EntryComparator& cmp) const = 0;
+ find_matching_enums(const vespalib::datastore::EntryComparator& cmp) const = 0;
virtual EnumPostingTree& get_posting_dictionary() = 0;
virtual const EnumPostingTree& get_posting_dictionary() const = 0;
diff --git a/searchlib/src/vespa/searchlib/attribute/imported_search_context.cpp b/searchlib/src/vespa/searchlib/attribute/imported_search_context.cpp
index 0c15e832487..5f49111f77b 100644
--- a/searchlib/src/vespa/searchlib/attribute/imported_search_context.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/imported_search_context.cpp
@@ -13,7 +13,7 @@
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.attribute.imported_search_context");
-using search::datastore::EntryRef;
+using vespalib::datastore::EntryRef;
using search::queryeval::EmptySearch;
using search::queryeval::SearchIterator;
using search::attribute::ISearchContext;
@@ -64,7 +64,7 @@ ImportedSearchContext::createIterator(fef::TermFieldMatchData* matchData, bool s
if (_merger.emptyArray()) {
return SearchIterator::UP(new EmptySearch());
} else {
- using Posting = btree::BTreeKeyData<uint32_t, int32_t>;
+ using Posting = vespalib::btree::BTreeKeyData<uint32_t, int32_t>;
using DocIt = DocIdIterator<Posting>;
DocIt postings;
auto array = _merger.getArray();
diff --git a/searchlib/src/vespa/searchlib/attribute/loadedvalue.h b/searchlib/src/vespa/searchlib/attribute/loadedvalue.h
index b1d1c178e5f..4e6b3d50df1 100644
--- a/searchlib/src/vespa/searchlib/attribute/loadedvalue.h
+++ b/searchlib/src/vespa/searchlib/attribute/loadedvalue.h
@@ -60,7 +60,7 @@ public:
IEnumStore::Index
getEidx() const
{
- return IEnumStore::Index(datastore::EntryRef(_value._eidx));
+ return IEnumStore::Index(vespalib::datastore::EntryRef(_value._eidx));
}
void
@@ -105,7 +105,7 @@ public:
};
uint32_t _docId;
uint32_t _idx;
- datastore::EntryRef _pidx;
+ vespalib::datastore::EntryRef _pidx;
private:
int32_t _weight;
Value _value;
diff --git a/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.h b/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.h
index ca4303e772f..35f8c89fb6d 100644
--- a/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.h
+++ b/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.h
@@ -11,14 +11,14 @@ namespace search::attribute {
/**
* Class for mapping from from document id to an array of values.
*/
-template <typename EntryT, typename RefT = datastore::EntryRefT<19> >
+template <typename EntryT, typename RefT = vespalib::datastore::EntryRefT<19> >
class MultiValueMapping : public MultiValueMappingBase
{
public:
using MultiValueType = EntryT;
using RefType = RefT;
private:
- using ArrayStore = datastore::ArrayStore<EntryT, RefT>;
+ using ArrayStore = vespalib::datastore::ArrayStore<EntryT, RefT>;
using generation_t = vespalib::GenerationHandler::generation_t;
using ConstArrayRef = vespalib::ConstArrayRef<EntryT>;
@@ -26,7 +26,7 @@ private:
public:
MultiValueMapping(const MultiValueMapping &) = delete;
MultiValueMapping & operator = (const MultiValueMapping &) = delete;
- MultiValueMapping(const datastore::ArrayStoreConfig &storeCfg,
+ MultiValueMapping(const vespalib::datastore::ArrayStoreConfig &storeCfg,
const vespalib::GrowStrategy &gs = vespalib::GrowStrategy());
~MultiValueMapping() override;
ConstArrayRef get(uint32_t docId) const { return _store.get(_indices[docId]); }
@@ -50,7 +50,7 @@ public:
vespalib::MemoryUsage getArrayStoreMemoryUsage() const override;
bool has_free_lists_enabled() const { return _store.has_free_lists_enabled(); }
- static datastore::ArrayStoreConfig optimizedConfigForHugePage(size_t maxSmallArraySize,
+ static vespalib::datastore::ArrayStoreConfig optimizedConfigForHugePage(size_t maxSmallArraySize,
size_t hugePageSize,
size_t smallPageSize,
size_t minNumArraysForNewBuffer,
diff --git a/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.hpp b/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.hpp
index 07f8077ae97..715c8f75225 100644
--- a/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.hpp
@@ -9,7 +9,7 @@
namespace search::attribute {
template <typename EntryT, typename RefT>
-MultiValueMapping<EntryT,RefT>::MultiValueMapping(const datastore::ArrayStoreConfig &storeCfg,
+MultiValueMapping<EntryT,RefT>::MultiValueMapping(const vespalib::datastore::ArrayStoreConfig &storeCfg,
const vespalib::GrowStrategy &gs)
#ifdef __clang__
#pragma clang diagnostic push
@@ -55,7 +55,7 @@ template <typename EntryT, typename RefT>
void
MultiValueMapping<EntryT,RefT>::compactWorst(bool compactMemory, bool compactAddressSpace)
{
- datastore::ICompactionContext::UP compactionContext(_store.compactWorst(compactMemory, compactAddressSpace));
+ vespalib::datastore::ICompactionContext::UP compactionContext(_store.compactWorst(compactMemory, compactAddressSpace));
if (compactionContext) {
compactionContext->compact(vespalib::ArrayRef<EntryRef>(&_indices[0], _indices.size()));
}
@@ -75,7 +75,7 @@ MultiValueMapping<EntryT, RefT>::getAddressSpaceUsage() const {
}
template <typename EntryT, typename RefT>
-datastore::ArrayStoreConfig
+vespalib::datastore::ArrayStoreConfig
MultiValueMapping<EntryT, RefT>::optimizedConfigForHugePage(size_t maxSmallArraySize,
size_t hugePageSize,
size_t smallPageSize,
diff --git a/searchlib/src/vespa/searchlib/attribute/multi_value_mapping_base.h b/searchlib/src/vespa/searchlib/attribute/multi_value_mapping_base.h
index d3ceb948d6a..10efee37260 100644
--- a/searchlib/src/vespa/searchlib/attribute/multi_value_mapping_base.h
+++ b/searchlib/src/vespa/searchlib/attribute/multi_value_mapping_base.h
@@ -17,7 +17,7 @@ namespace search::attribute {
class MultiValueMappingBase
{
public:
- using EntryRef = datastore::EntryRef;
+ using EntryRef = vespalib::datastore::EntryRef;
using RefVector = vespalib::RcuVectorBase<EntryRef>;
protected:
diff --git a/searchlib/src/vespa/searchlib/attribute/multienumattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multienumattribute.hpp
index 40f211c2621..71ee1640b32 100644
--- a/searchlib/src/vespa/searchlib/attribute/multienumattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/multienumattribute.hpp
@@ -27,7 +27,7 @@ MultiValueEnumAttribute<B, M>::extractChangeData(const Change & c, EnumIndex & i
if (c._enumScratchPad == Change::UNSET_ENUM) {
return this->_enumStore.find_index(c._data.raw(), idx);
}
- idx = EnumIndex(datastore::EntryRef(c._enumScratchPad));
+ idx = EnumIndex(vespalib::datastore::EntryRef(c._enumScratchPad));
return true;
}
diff --git a/searchlib/src/vespa/searchlib/attribute/multienumattributesaver.cpp b/searchlib/src/vespa/searchlib/attribute/multienumattributesaver.cpp
index 016ed8bf710..0e1a6fac1a0 100644
--- a/searchlib/src/vespa/searchlib/attribute/multienumattributesaver.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/multienumattributesaver.cpp
@@ -113,7 +113,7 @@ onSave(IAttributeSaveTarget &saveTarget)
_enumSaver.writeUdat(saveTarget);
_enumSaver.get_enumerator().enumerateValues();
for (uint32_t docId = 0; docId < _frozenIndices.size(); ++docId) {
- datastore::EntryRef idx = _frozenIndices[docId];
+ vespalib::datastore::EntryRef idx = _frozenIndices[docId];
vespalib::ConstArrayRef<MultiValueType> handle(_mvMapping.getDataForIdx(idx));
countWriter.writeCount(handle.size());
weightWriter.writeWeights(handle);
diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericattributesaver.cpp b/searchlib/src/vespa/searchlib/attribute/multinumericattributesaver.cpp
index fe19bf236aa..f4c55777e09 100644
--- a/searchlib/src/vespa/searchlib/attribute/multinumericattributesaver.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/multinumericattributesaver.cpp
@@ -67,7 +67,7 @@ onSave(IAttributeSaveTarget &saveTarget)
DatWriter datWriter(saveTarget);
for (uint32_t docId = 0; docId < _frozenIndices.size(); ++docId) {
- datastore::EntryRef idx = _frozenIndices[docId];
+ vespalib::datastore::EntryRef idx = _frozenIndices[docId];
vespalib::ConstArrayRef<MultiValueType> values(_mvMapping.getDataForIdx(idx));
countWriter.writeCount(values.size());
weightWriter.writeWeights(values);
diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.h b/searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.h
index 1e22bc1fefa..fa962f8d469 100644
--- a/searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.h
+++ b/searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.h
@@ -36,8 +36,8 @@ private:
const MultiValueNumericPostingAttribute &self;
DocumentWeightAttributeAdapter(const MultiValueNumericPostingAttribute &self_in) : self(self_in) {}
virtual LookupResult lookup(const vespalib::string &term) const override final;
- virtual void create(datastore::EntryRef idx, std::vector<DocumentWeightIterator> &dst) const override final;
- virtual DocumentWeightIterator create(datastore::EntryRef idx) const override final;
+ virtual void create(vespalib::datastore::EntryRef idx, std::vector<DocumentWeightIterator> &dst) const override final;
+ virtual DocumentWeightIterator create(vespalib::datastore::EntryRef idx) const override final;
};
DocumentWeightAttributeAdapter _document_weight_attribute_adapter;
diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.hpp
index 15d5d9e615a..283c3da00b1 100644
--- a/searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.hpp
@@ -88,7 +88,7 @@ MultiValueNumericPostingAttribute<B, M>::DocumentWeightAttributeAdapter::lookup(
{
const Dictionary &dictionary = self._enumStore.get_posting_dictionary();
const FrozenDictionary frozenDictionary(dictionary.getFrozenView());
- DictionaryConstIterator dictItr(btree::BTreeNode::Ref(), dictionary.getAllocator());
+ DictionaryConstIterator dictItr(vespalib::btree::BTreeNode::Ref(), dictionary.getAllocator());
char *end = nullptr;
int64_t int_term = strtoll(term.c_str(), &end, 10);
@@ -97,7 +97,7 @@ MultiValueNumericPostingAttribute<B, M>::DocumentWeightAttributeAdapter::lookup(
dictItr.lower_bound(frozenDictionary.getRoot(), EnumIndex(), comp);
if (dictItr.valid() && !comp(EnumIndex(), dictItr.getKey())) {
- datastore::EntryRef pidx(dictItr.getData());
+ vespalib::datastore::EntryRef pidx(dictItr.getData());
if (pidx.valid()) {
const PostingList &plist = self.getPostingList();
auto minmax = plist.getAggregated(pidx);
@@ -110,7 +110,7 @@ MultiValueNumericPostingAttribute<B, M>::DocumentWeightAttributeAdapter::lookup(
template <typename B, typename M>
void
-MultiValueNumericPostingAttribute<B, M>::DocumentWeightAttributeAdapter::create(datastore::EntryRef idx, std::vector<DocumentWeightIterator> &dst) const
+MultiValueNumericPostingAttribute<B, M>::DocumentWeightAttributeAdapter::create(vespalib::datastore::EntryRef idx, std::vector<DocumentWeightIterator> &dst) const
{
assert(idx.valid());
self.getPostingList().beginFrozen(idx, dst);
@@ -118,7 +118,7 @@ MultiValueNumericPostingAttribute<B, M>::DocumentWeightAttributeAdapter::create(
template <typename B, typename M>
DocumentWeightIterator
-MultiValueNumericPostingAttribute<B, M>::DocumentWeightAttributeAdapter::create(datastore::EntryRef idx) const
+MultiValueNumericPostingAttribute<B, M>::DocumentWeightAttributeAdapter::create(vespalib::datastore::EntryRef idx) const
{
assert(idx.valid());
return self.getPostingList().beginFrozen(idx);
diff --git a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.cpp b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.cpp
index 4409bdd5857..3c41265620f 100644
--- a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.cpp
@@ -9,7 +9,7 @@ LOG_SETUP(".searchlib.attribute.multi_string_post_attribute");
namespace search {
IEnumStore::Index
-StringEnumIndexMapper::map(IEnumStore::Index original, const datastore::EntryComparator& compare) const
+StringEnumIndexMapper::map(IEnumStore::Index original, const vespalib::datastore::EntryComparator& compare) const
{
return _dictionary.find(original, compare).getKey();
}
diff --git a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.h b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.h
index bb90bbe38cb..c755c5cb649 100644
--- a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.h
+++ b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.h
@@ -34,8 +34,8 @@ private:
const MultiValueStringPostingAttributeT &self;
DocumentWeightAttributeAdapter(const MultiValueStringPostingAttributeT &self_in) : self(self_in) {}
virtual LookupResult lookup(const vespalib::string &term) const override final;
- virtual void create(datastore::EntryRef idx, std::vector<DocumentWeightIterator> &dst) const override final;
- virtual DocumentWeightIterator create(datastore::EntryRef idx) const override final;
+ virtual void create(vespalib::datastore::EntryRef idx, std::vector<DocumentWeightIterator> &dst) const override final;
+ virtual DocumentWeightIterator create(vespalib::datastore::EntryRef idx) const override final;
};
DocumentWeightAttributeAdapter _document_weight_attribute_adapter;
diff --git a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp
index 4f247059171..7bc62169b3c 100644
--- a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp
@@ -30,7 +30,7 @@ class StringEnumIndexMapper : public EnumIndexMapper
{
public:
StringEnumIndexMapper(const EnumPostingTree & dictionary) : _dictionary(dictionary) { }
- IEnumStore::Index map(IEnumStore::Index original, const datastore::EntryComparator& compare) const override;
+ IEnumStore::Index map(IEnumStore::Index original, const vespalib::datastore::EntryComparator& compare) const override;
virtual bool hasFold() const override { return true; }
private:
const EnumPostingTree & _dictionary;
@@ -104,12 +104,12 @@ MultiValueStringPostingAttributeT<B, T>::DocumentWeightAttributeAdapter::lookup(
{
const Dictionary &dictionary = self._enumStore.get_posting_dictionary();
const FrozenDictionary frozenDictionary(dictionary.getFrozenView());
- DictionaryConstIterator dictItr(btree::BTreeNode::Ref(), dictionary.getAllocator());
+ DictionaryConstIterator dictItr(vespalib::btree::BTreeNode::Ref(), dictionary.getAllocator());
auto comp = self._enumStore.make_folded_comparator(term.c_str());
dictItr.lower_bound(frozenDictionary.getRoot(), EnumIndex(), comp);
if (dictItr.valid() && !comp(EnumIndex(), dictItr.getKey())) {
- datastore::EntryRef pidx(dictItr.getData());
+ vespalib::datastore::EntryRef pidx(dictItr.getData());
if (pidx.valid()) {
const PostingList &plist = self.getPostingList();
auto minmax = plist.getAggregated(pidx);
@@ -121,7 +121,7 @@ MultiValueStringPostingAttributeT<B, T>::DocumentWeightAttributeAdapter::lookup(
template <typename B, typename T>
void
-MultiValueStringPostingAttributeT<B, T>::DocumentWeightAttributeAdapter::create(datastore::EntryRef idx, std::vector<DocumentWeightIterator> &dst) const
+MultiValueStringPostingAttributeT<B, T>::DocumentWeightAttributeAdapter::create(vespalib::datastore::EntryRef idx, std::vector<DocumentWeightIterator> &dst) const
{
assert(idx.valid());
self.getPostingList().beginFrozen(idx, dst);
@@ -129,7 +129,7 @@ MultiValueStringPostingAttributeT<B, T>::DocumentWeightAttributeAdapter::create(
template <typename B, typename M>
DocumentWeightIterator
-MultiValueStringPostingAttributeT<B, M>::DocumentWeightAttributeAdapter::create(datastore::EntryRef idx) const
+MultiValueStringPostingAttributeT<B, M>::DocumentWeightAttributeAdapter::create(vespalib::datastore::EntryRef idx) const
{
assert(idx.valid());
return self.getPostingList().beginFrozen(idx);
diff --git a/searchlib/src/vespa/searchlib/attribute/multivalueattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multivalueattribute.hpp
index 0ae536aee23..bafb859a246 100644
--- a/searchlib/src/vespa/searchlib/attribute/multivalueattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/multivalueattribute.hpp
@@ -48,9 +48,9 @@ struct HashFn {
};
template <>
-struct HashFn<search::datastore::EntryRef> {
+struct HashFn<vespalib::datastore::EntryRef> {
struct EntryRefHasher {
- size_t operator() (const search::datastore::EntryRef& v) const noexcept {
+ size_t operator() (const vespalib::datastore::EntryRef& v) const noexcept {
return v.ref();
}
};
diff --git a/searchlib/src/vespa/searchlib/attribute/posting_list_merger.cpp b/searchlib/src/vespa/searchlib/attribute/posting_list_merger.cpp
index b1ad8665441..be407ebc849 100644
--- a/searchlib/src/vespa/searchlib/attribute/posting_list_merger.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/posting_list_merger.cpp
@@ -80,7 +80,7 @@ PostingListMerger<DataT>::merge(PostingVector &v, PostingVector &temp, const Sta
}
-template class PostingListMerger<btree::BTreeNoLeafData>;
+template class PostingListMerger<vespalib::btree::BTreeNoLeafData>;
template class PostingListMerger<int32_t>;
}
diff --git a/searchlib/src/vespa/searchlib/attribute/posting_list_merger.h b/searchlib/src/vespa/searchlib/attribute/posting_list_merger.h
index 6d7693da30e..6a10ba73951 100644
--- a/searchlib/src/vespa/searchlib/attribute/posting_list_merger.h
+++ b/searchlib/src/vespa/searchlib/attribute/posting_list_merger.h
@@ -15,7 +15,7 @@ namespace search::attribute {
template <typename DataT>
class PostingListMerger
{
- using Posting = btree::BTreeKeyData<uint32_t, DataT>;
+ using Posting = vespalib::btree::BTreeKeyData<uint32_t, DataT>;
using PostingVector = std::vector<Posting>;
using StartVector = std::vector<size_t>;
diff --git a/searchlib/src/vespa/searchlib/attribute/posting_list_traverser.h b/searchlib/src/vespa/searchlib/attribute/posting_list_traverser.h
index fffed4d8782..fabeb3c1164 100644
--- a/searchlib/src/vespa/searchlib/attribute/posting_list_traverser.h
+++ b/searchlib/src/vespa/searchlib/attribute/posting_list_traverser.h
@@ -11,7 +11,7 @@ namespace search::attribute {
template <typename PostingList>
class PostingListTraverser
{
- using EntryRef = datastore::EntryRef;
+ using EntryRef = vespalib::datastore::EntryRef;
const PostingList &_postingList;
EntryRef _pidx;
public:
diff --git a/searchlib/src/vespa/searchlib/attribute/postingchange.cpp b/searchlib/src/vespa/searchlib/attribute/postingchange.cpp
index 066b391f514..fc8a3c7deed 100644
--- a/searchlib/src/vespa/searchlib/attribute/postingchange.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/postingchange.cpp
@@ -102,7 +102,7 @@ removeDupRemovals(std::vector<uint32_t> &removals)
}
IEnumStore::Index
-EnumIndexMapper::map(IEnumStore::Index original, const datastore::EntryComparator& compare) const
+EnumIndexMapper::map(IEnumStore::Index original, const vespalib::datastore::EntryComparator& compare) const
{
(void) compare;
return original;
@@ -140,14 +140,14 @@ public:
const WeightedIndex * entriesOld, size_t szOld,
AlwaysWeightedIndexVector & added, AlwaysWeightedIndexVector & changed, AlwaysWeightedIndexVector & removed);
- ActualChangeComputer(const datastore::EntryComparator& compare, const EnumIndexMapper& mapper);
+ ActualChangeComputer(const vespalib::datastore::EntryComparator& compare, const EnumIndexMapper& mapper);
~ActualChangeComputer();
private:
WeightedIndexVector _oldEntries;
WeightedIndexVector _newEntries;
vespalib::hash_map<uint32_t, uint32_t> _cachedMapping;
- const datastore::EntryComparator &_compare;
+ const vespalib::datastore::EntryComparator &_compare;
const EnumIndexMapper &_mapper;
const bool _hasFold;
@@ -161,7 +161,7 @@ private:
if (itr.second) {
itr.first->second = _mapper.map(unmapped, _compare).ref();
}
- return EnumIndex(datastore::EntryRef(itr.first->second));
+ return EnumIndex(vespalib::datastore::EntryRef(itr.first->second));
}
@@ -232,7 +232,7 @@ public:
};
template <typename WeightedIndex>
-ActualChangeComputer<WeightedIndex>::ActualChangeComputer(const datastore::EntryComparator &compare,
+ActualChangeComputer<WeightedIndex>::ActualChangeComputer(const vespalib::datastore::EntryComparator &compare,
const EnumIndexMapper &mapper)
: _oldEntries(),
_newEntries(),
@@ -288,7 +288,7 @@ template <typename MultivalueMapping>
PostingMap
PostingChangeComputerT<WeightedIndex, PostingMap>::
compute(const MultivalueMapping & mvm, const DocIndices & docIndices,
- const datastore::EntryComparator & compare, const EnumIndexMapper & mapper)
+ const vespalib::datastore::EntryComparator & compare, const EnumIndexMapper & mapper)
{
typedef ActualChangeComputer<WeightedIndex> AC;
AC actualChange(compare, mapper);
@@ -318,7 +318,7 @@ template class PostingChange<AttributePosting>;
template class PostingChange<AttributeWeightPosting>;
-typedef PostingChange<btree::BTreeKeyData<unsigned int, int> > WeightedPostingChange;
+typedef PostingChange<vespalib::btree::BTreeKeyData<unsigned int, int> > WeightedPostingChange;
typedef std::map<EnumPostingPair, WeightedPostingChange> WeightedPostingChangeMap;
typedef IEnumStore::Index EnumIndex;
typedef multivalue::WeightedValue<EnumIndex> WeightedIndex;
@@ -332,13 +332,13 @@ typedef std::vector<std::pair<uint32_t, std::vector<ValueIndex>>> DocIndicesValu
template WeightedPostingChangeMap PostingChangeComputerT<WeightedIndex, WeightedPostingChangeMap>
::compute<WeightedMultiValueMapping>(const WeightedMultiValueMapping &,
const DocIndicesWeighted &,
- const datastore::EntryComparator &,
+ const vespalib::datastore::EntryComparator &,
const EnumIndexMapper &);
template WeightedPostingChangeMap PostingChangeComputerT<ValueIndex, WeightedPostingChangeMap>
::compute<ValueMultiValueMapping>(const ValueMultiValueMapping &,
const DocIndicesValue &,
- const datastore::EntryComparator &,
+ const vespalib::datastore::EntryComparator &,
const EnumIndexMapper &);
}
diff --git a/searchlib/src/vespa/searchlib/attribute/postingchange.h b/searchlib/src/vespa/searchlib/attribute/postingchange.h
index 5edb2c87038..459fd2b8211 100644
--- a/searchlib/src/vespa/searchlib/attribute/postingchange.h
+++ b/searchlib/src/vespa/searchlib/attribute/postingchange.h
@@ -6,7 +6,7 @@
#include "postingdata.h"
#include <vespa/vespalib/util/array.h>
-namespace search::datastore { class EntryComparator; }
+namespace vespalib::datastore { class EntryComparator; }
namespace search {
@@ -49,7 +49,7 @@ class EnumIndexMapper
{
public:
virtual ~EnumIndexMapper() { }
- virtual IEnumStore::Index map(IEnumStore::Index original, const datastore::EntryComparator& compare) const;
+ virtual IEnumStore::Index map(IEnumStore::Index original, const vespalib::datastore::EntryComparator& compare) const;
virtual bool hasFold() const { return false; }
};
@@ -61,7 +61,7 @@ private:
public:
template <typename MultivalueMapping>
static PostingMap compute(const MultivalueMapping & mvm, const DocIndices & docIndices,
- const datastore::EntryComparator & compare, const EnumIndexMapper & mapper);
+ const vespalib::datastore::EntryComparator & compare, const EnumIndexMapper & mapper);
};
template <>
@@ -70,7 +70,7 @@ PostingChange<AttributePosting>::add(uint32_t docId, int32_t weight)
{
(void) weight;
_additions.push_back(AttributePosting(docId,
- btree::BTreeNoLeafData()));
+ vespalib::btree::BTreeNoLeafData()));
}
diff --git a/searchlib/src/vespa/searchlib/attribute/postingdata.h b/searchlib/src/vespa/searchlib/attribute/postingdata.h
index db8522d0ce5..8fe3446dac3 100644
--- a/searchlib/src/vespa/searchlib/attribute/postingdata.h
+++ b/searchlib/src/vespa/searchlib/attribute/postingdata.h
@@ -6,8 +6,8 @@
namespace search {
-using AttributePosting = btree::BTreeKeyData<uint32_t, btree::BTreeNoLeafData>;
-using AttributeWeightPosting = btree::BTreeKeyData<uint32_t, int32_t>;
+using AttributePosting = vespalib::btree::BTreeKeyData<uint32_t, vespalib::btree::BTreeNoLeafData>;
+using AttributeWeightPosting = vespalib::btree::BTreeKeyData<uint32_t, int32_t>;
}
diff --git a/searchlib/src/vespa/searchlib/attribute/postinglistattribute.cpp b/searchlib/src/vespa/searchlib/attribute/postinglistattribute.cpp
index 19ef92c9356..ed764dd9ffc 100644
--- a/searchlib/src/vespa/searchlib/attribute/postinglistattribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/postinglistattribute.cpp
@@ -115,7 +115,7 @@ PostingListAttributeBase<P>::handle_load_posting_lists_and_update_enum_store(enu
template <typename P>
void
PostingListAttributeBase<P>::updatePostings(PostingMap &changePost,
- datastore::EntryComparator &cmp)
+ vespalib::datastore::EntryComparator &cmp)
{
for (auto& elem : changePost) {
auto& change = elem.second;
@@ -160,7 +160,7 @@ PostingListAttributeBase<P>::
clearPostings(attribute::IAttributeVector::EnumHandle eidx,
uint32_t fromLid,
uint32_t toLid,
- datastore::EntryComparator &cmp)
+ vespalib::datastore::EntryComparator &cmp)
{
PostingChange<P> postings;
diff --git a/searchlib/src/vespa/searchlib/attribute/postinglistattribute.h b/searchlib/src/vespa/searchlib/attribute/postinglistattribute.h
index 51aee8fc59a..0d4a4982793 100644
--- a/searchlib/src/vespa/searchlib/attribute/postinglistattribute.h
+++ b/searchlib/src/vespa/searchlib/attribute/postinglistattribute.h
@@ -21,9 +21,9 @@ class EnumPostingPair
{
private:
IEnumStore::Index _idx;
- const datastore::EntryComparator *_cmp;
+ const vespalib::datastore::EntryComparator *_cmp;
public:
- EnumPostingPair(IEnumStore::Index idx, const datastore::EntryComparator *cmp)
+ EnumPostingPair(IEnumStore::Index idx, const vespalib::datastore::EntryComparator *cmp)
: _idx(idx),
_cmp(cmp)
{ }
@@ -41,7 +41,7 @@ protected:
using AggregationTraits = attribute::PostingListTraits<DataType>;
using DocId = AttributeVector::DocId;
- using EntryRef = datastore::EntryRef;
+ using EntryRef = vespalib::datastore::EntryRef;
using EnumIndex = IEnumStore::Index;
using LoadedEnumAttributeVector = attribute::LoadedEnumAttributeVector;
using PostingList = typename AggregationTraits::PostingList;
@@ -57,7 +57,7 @@ protected:
virtual void updatePostings(PostingMap & changePost) = 0;
- void updatePostings(PostingMap &changePost, datastore::EntryComparator &cmp);
+ void updatePostings(PostingMap &changePost, vespalib::datastore::EntryComparator &cmp);
void clearAllPostings();
void disableFreeLists() { _postingList.disableFreeLists(); }
void disableElemHoldList() { _postingList.disableElemHoldList(); }
@@ -65,7 +65,7 @@ protected:
bool forwardedOnAddDoc(DocId doc, size_t wantSize, size_t wantCapacity);
void clearPostings(attribute::IAttributeVector::EnumHandle eidx, uint32_t fromLid,
- uint32_t toLid, datastore::EntryComparator &cmp);
+ uint32_t toLid, vespalib::datastore::EntryComparator &cmp);
void forwardedShrinkLidSpace(uint32_t newSize) override;
virtual vespalib::MemoryUsage getMemoryUsage() const override;
@@ -82,7 +82,7 @@ public:
using Parent = PostingListAttributeBase<P>;
using Dictionary = EnumPostingTree;
- using EntryRef = datastore::EntryRef;
+ using EntryRef = vespalib::datastore::EntryRef;
using EnumIndex = IEnumStore::Index;
using EnumStore = EnumStoreType;
using FoldedComparatorType = typename EnumStore::FoldedComparatorType;
diff --git a/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.cpp b/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.cpp
index 812523a3306..0dc063a5165 100644
--- a/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.cpp
@@ -8,7 +8,7 @@
namespace search::attribute {
-using btree::BTreeNode;
+using vespalib::btree::BTreeNode;
PostingListSearchContext::
PostingListSearchContext(const Dictionary &dictionary,
@@ -44,7 +44,7 @@ PostingListSearchContext::~PostingListSearchContext() = default;
void
-PostingListSearchContext::lookupTerm(const datastore::EntryComparator &comp)
+PostingListSearchContext::lookupTerm(const vespalib::datastore::EntryComparator &comp)
{
_lowerDictItr.lower_bound(_frozenDictionary.getRoot(), EnumIndex(), comp);
_upperDictItr = _lowerDictItr;
@@ -56,8 +56,8 @@ PostingListSearchContext::lookupTerm(const datastore::EntryComparator &comp)
void
-PostingListSearchContext::lookupRange(const datastore::EntryComparator &low,
- const datastore::EntryComparator &high)
+PostingListSearchContext::lookupRange(const vespalib::datastore::EntryComparator &low,
+ const vespalib::datastore::EntryComparator &high)
{
_lowerDictItr.lower_bound(_frozenDictionary.getRoot(), EnumIndex(), low);
_upperDictItr = _lowerDictItr;
@@ -72,13 +72,13 @@ void
PostingListSearchContext::lookupSingle()
{
if (_lowerDictItr.valid()) {
- _pidx = datastore::EntryRef(_lowerDictItr.getData());
+ _pidx = vespalib::datastore::EntryRef(_lowerDictItr.getData());
}
}
-template class PostingListSearchContextT<btree::BTreeNoLeafData>;
+template class PostingListSearchContextT<vespalib::btree::BTreeNoLeafData>;
template class PostingListSearchContextT<int32_t>;
-template class PostingListFoldedSearchContextT<btree::BTreeNoLeafData>;
+template class PostingListFoldedSearchContextT<vespalib::btree::BTreeNoLeafData>;
template class PostingListFoldedSearchContextT<int32_t>;
}
diff --git a/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.h b/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.h
index e94de44e45b..69450acd98d 100644
--- a/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.h
+++ b/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.h
@@ -38,8 +38,8 @@ protected:
uint64_t _numValues; // attr.getStatus().getNumValues();
bool _hasWeight;
bool _useBitVector;
- datastore::EntryRef _pidx;
- datastore::EntryRef _frozenRoot; // Posting list in tree form
+ vespalib::datastore::EntryRef _pidx;
+ vespalib::datastore::EntryRef _frozenRoot; // Posting list in tree form
float _FSTC; // Filtering Search Time Constant
float _PLSTC; // Posting List Search Time Constant
const IEnumStore &_esb;
@@ -53,8 +53,8 @@ protected:
~PostingListSearchContext();
- void lookupTerm(const datastore::EntryComparator &comp);
- void lookupRange(const datastore::EntryComparator &low, const datastore::EntryComparator &high);
+ void lookupTerm(const vespalib::datastore::EntryComparator &comp);
+ void lookupRange(const vespalib::datastore::EntryComparator &low, const vespalib::datastore::EntryComparator &high);
void lookupSingle();
virtual bool useThis(const DictionaryConstIterator & it) const {
(void) it;
@@ -99,7 +99,7 @@ protected:
using PostingList = typename Traits::PostingList;
using Posting = typename Traits::Posting;
using PostingVector = std::vector<Posting>;
- using EntryRef = datastore::EntryRef;
+ using EntryRef = vespalib::datastore::EntryRef;
using FrozenView = typename PostingList::BTreeType::FrozenView;
const PostingList &_postingList;
@@ -357,9 +357,9 @@ getIterators(bool shouldApplyRangeLimit)
-extern template class PostingListSearchContextT<btree::BTreeNoLeafData>;
+extern template class PostingListSearchContextT<vespalib::btree::BTreeNoLeafData>;
extern template class PostingListSearchContextT<int32_t>;
-extern template class PostingListFoldedSearchContextT<btree::BTreeNoLeafData>;
+extern template class PostingListFoldedSearchContextT<vespalib::btree::BTreeNoLeafData>;
extern template class PostingListFoldedSearchContextT<int32_t>;
}
diff --git a/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.hpp b/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.hpp
index e60cd4f5887..4cd8db9010a 100644
--- a/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.hpp
@@ -54,7 +54,7 @@ PostingListSearchContextT<DataT>::lookupSingle()
auto frozenView = _postingList.getTreeEntry(_pidx)->getFrozenView(_postingList.getAllocator());
_frozenRoot = frozenView.getRoot();
if (!_frozenRoot.valid()) {
- _pidx = datastore::EntryRef();
+ _pidx = vespalib::datastore::EntryRef();
}
} else {
_gbv = bv;
@@ -64,7 +64,7 @@ PostingListSearchContextT<DataT>::lookupSingle()
auto frozenView = _postingList.getTreeEntry(_pidx)->getFrozenView(_postingList.getAllocator());
_frozenRoot = frozenView.getRoot();
if (!_frozenRoot.valid()) {
- _pidx = datastore::EntryRef();
+ _pidx = vespalib::datastore::EntryRef();
}
}
}
@@ -92,7 +92,7 @@ PostingListSearchContextT<DataT>::fillArray()
for (auto it(_lowerDictItr); it != _upperDictItr; ++it) {
if (useThis(it)) {
_merger.addToArray(PostingListTraverser<PostingList>(_postingList,
- datastore::EntryRef(it.getData())));
+ vespalib::datastore::EntryRef(it.getData())));
}
}
_merger.merge();
@@ -106,7 +106,7 @@ PostingListSearchContextT<DataT>::fillBitVector()
for (auto it(_lowerDictItr); it != _upperDictItr; ++it) {
if (useThis(it)) {
_merger.addToBitVector(PostingListTraverser<PostingList>(_postingList,
- datastore::EntryRef(it.getData())));
+ vespalib::datastore::EntryRef(it.getData())));
}
}
}
diff --git a/searchlib/src/vespa/searchlib/attribute/postinglisttraits.cpp b/searchlib/src/vespa/searchlib/attribute/postinglisttraits.cpp
index 6b86e3908d2..ae872ee60f1 100644
--- a/searchlib/src/vespa/searchlib/attribute/postinglisttraits.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/postinglisttraits.cpp
@@ -7,7 +7,7 @@
#include <vespa/vespalib/btree/btreebuilder.hpp>
#include <vespa/vespalib/btree/btreeiterator.hpp>
-namespace search::btree {
+namespace vespalib::btree {
using NoD = search::attribute::PostingListTraits<BTreeNoLeafData>;
using WD = search::attribute::PostingListTraits<int32_t>;
diff --git a/searchlib/src/vespa/searchlib/attribute/postinglisttraits.h b/searchlib/src/vespa/searchlib/attribute/postinglisttraits.h
index d07bdd3100d..0c0b43a22e6 100644
--- a/searchlib/src/vespa/searchlib/attribute/postinglisttraits.h
+++ b/searchlib/src/vespa/searchlib/attribute/postinglisttraits.h
@@ -10,16 +10,16 @@ template <typename DataT> class PostingListTraits;
template <typename DataT> class PostingStore;
template <>
-class PostingListTraits<btree::BTreeNoLeafData>
+class PostingListTraits<vespalib::btree::BTreeNoLeafData>
{
private:
- using BTreeTraits = btree::BTreeTraits<64, 16, 8, true>;
+ using BTreeTraits = vespalib::btree::BTreeTraits<64, 16, 8, true>;
public:
- using AggregatedType = btree::NoAggregated;
- using AggrCalcType = btree::NoAggrCalc;
- using const_iterator = btree::BTreeConstIterator<uint32_t, btree::BTreeNoLeafData, AggregatedType, std::less<uint32_t>, BTreeTraits >;
- using PostingStoreBase = btree::BTreeStore<uint32_t, btree::BTreeNoLeafData, AggregatedType, std::less<uint32_t>, BTreeTraits, AggrCalcType> ;
- using PostingList = PostingStore<btree::BTreeNoLeafData>;
+ using AggregatedType = vespalib::btree::NoAggregated;
+ using AggrCalcType = vespalib::btree::NoAggrCalc;
+ using const_iterator = vespalib::btree::BTreeConstIterator<uint32_t, vespalib::btree::BTreeNoLeafData, AggregatedType, std::less<uint32_t>, BTreeTraits >;
+ using PostingStoreBase = vespalib::btree::BTreeStore<uint32_t, vespalib::btree::BTreeNoLeafData, AggregatedType, std::less<uint32_t>, BTreeTraits, AggrCalcType> ;
+ using PostingList = PostingStore<vespalib::btree::BTreeNoLeafData>;
using Posting = PostingStoreBase::KeyDataType;
};
@@ -27,12 +27,12 @@ template <>
class PostingListTraits<int32_t>
{
private:
- using BTreeTraits = btree::BTreeTraits<32, 16, 9, true>;
+ using BTreeTraits = vespalib::btree::BTreeTraits<32, 16, 9, true>;
public:
- using AggregatedType = btree::MinMaxAggregated;
- using AggrCalcType = btree::MinMaxAggrCalc;
- using const_iterator = btree::BTreeConstIterator<uint32_t, int32_t, AggregatedType, std::less<uint32_t>, BTreeTraits >;
- using PostingStoreBase = btree::BTreeStore<uint32_t, int32_t, AggregatedType, std::less<uint32_t>, BTreeTraits, AggrCalcType>;
+ using AggregatedType = vespalib::btree::MinMaxAggregated;
+ using AggrCalcType = vespalib::btree::MinMaxAggrCalc;
+ using const_iterator = vespalib::btree::BTreeConstIterator<uint32_t, int32_t, AggregatedType, std::less<uint32_t>, BTreeTraits >;
+ using PostingStoreBase = vespalib::btree::BTreeStore<uint32_t, int32_t, AggregatedType, std::less<uint32_t>, BTreeTraits, AggrCalcType>;
using PostingList = PostingStore<int32_t>;
using Posting = PostingStoreBase::KeyDataType;
};
diff --git a/searchlib/src/vespa/searchlib/attribute/postingstore.cpp b/searchlib/src/vespa/searchlib/attribute/postingstore.cpp
index 2badb199934..26339392d2c 100644
--- a/searchlib/src/vespa/searchlib/attribute/postingstore.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/postingstore.cpp
@@ -9,7 +9,7 @@
namespace search::attribute {
-using btree::BTreeNoLeafData;
+using vespalib::btree::BTreeNoLeafData;
// #define FORCE_BITVECTORS
diff --git a/searchlib/src/vespa/searchlib/attribute/postingstore.h b/searchlib/src/vespa/searchlib/attribute/postingstore.h
index 278b587deda..13ac21d2bf3 100644
--- a/searchlib/src/vespa/searchlib/attribute/postingstore.h
+++ b/searchlib/src/vespa/searchlib/attribute/postingstore.h
@@ -19,7 +19,7 @@ class Config;
class BitVectorEntry
{
public:
- datastore::EntryRef _tree; // Daisy chained reference to tree based posting list
+ vespalib::datastore::EntryRef _tree; // Daisy chained reference to tree based posting list
std::shared_ptr<GrowableBitVector> _bv; // bitvector
public:
@@ -61,7 +61,7 @@ template <typename DataT>
class PostingStore : public PostingListTraits<DataT>::PostingStoreBase,
public PostingStoreBase2
{
- datastore::BufferType<BitVectorEntry> _bvType;
+ vespalib::datastore::BufferType<BitVectorEntry> _bvType;
public:
typedef DataT DataType;
typedef typename PostingListTraits<DataT>::PostingStoreBase Parent;
@@ -75,7 +75,7 @@ public:
typedef typename Parent::AggregatedType AggregatedType;
typedef typename Parent::BTreeTypeRefPair BTreeTypeRefPair;
typedef typename Parent::Builder Builder;
- typedef datastore::EntryRef EntryRef;
+ typedef vespalib::datastore::EntryRef EntryRef;
typedef std::less<uint32_t> CompareT;
using Parent::applyNewArray;
using Parent::applyNewTree;
@@ -94,7 +94,7 @@ public:
using Parent::_allocator;
using Parent::_aggrCalc;
using Parent::BUFFERTYPE_BTREE;
- typedef datastore::Handle<BitVectorEntry> BitVectorRefPair;
+ typedef vespalib::datastore::Handle<BitVectorEntry> BitVectorRefPair;
PostingStore(EnumPostingTree &dict, Status &status, const Config &config);
@@ -109,7 +109,7 @@ public:
BitVectorRefPair allocBitVector() {
return _store.template freeListAllocator<BitVectorEntry,
- btree::DefaultReclaimer<BitVectorEntry> >(BUFFERTYPE_BITVECTOR).alloc();
+ vespalib::btree::DefaultReclaimer<BitVectorEntry> >(BUFFERTYPE_BITVECTOR).alloc();
}
/*
@@ -183,10 +183,10 @@ private:
};
template <>
-inline btree::BTreeNoLeafData
-PostingStore<btree::BTreeNoLeafData>::bitVectorWeight()
+inline vespalib::btree::BTreeNoLeafData
+PostingStore<vespalib::btree::BTreeNoLeafData>::bitVectorWeight()
{
- return btree::BTreeNoLeafData();
+ return vespalib::btree::BTreeNoLeafData();
}
template <>
diff --git a/searchlib/src/vespa/searchlib/attribute/reference.h b/searchlib/src/vespa/searchlib/attribute/reference.h
index bc7f3615fa4..8d7e37f585b 100644
--- a/searchlib/src/vespa/searchlib/attribute/reference.h
+++ b/searchlib/src/vespa/searchlib/attribute/reference.h
@@ -11,7 +11,7 @@ namespace search::attribute {
* Class representing a single reference in a reference attribute.
*/
class Reference {
- using EntryRef = search::datastore::EntryRef;
+ using EntryRef = vespalib::datastore::EntryRef;
using GlobalId = document::GlobalId;
GlobalId _gid;
mutable uint32_t _lid; // target lid
diff --git a/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp b/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp
index 8e7f55a0a60..cd53253ad0a 100644
--- a/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp
@@ -132,7 +132,7 @@ ReferenceAttribute::buildReverseMapping()
}
prevRef = elem.first;
}
- adds.emplace_back(elem.second, btree::BTreeNoLeafData());
+ adds.emplace_back(elem.second, vespalib::btree::BTreeNoLeafData());
}
if (prevRef.valid()) {
buildReverseMapping(prevRef, adds);
@@ -472,7 +472,7 @@ IMPLEMENT_IDENTIFIABLE_ABSTRACT(ReferenceAttribute, AttributeVector);
}
-namespace search::datastore {
+namespace vespalib::datastore {
using Reference = search::attribute::Reference;
diff --git a/searchlib/src/vespa/searchlib/attribute/reference_attribute.h b/searchlib/src/vespa/searchlib/attribute/reference_attribute.h
index 87d624eb21f..706abc53819 100644
--- a/searchlib/src/vespa/searchlib/attribute/reference_attribute.h
+++ b/searchlib/src/vespa/searchlib/attribute/reference_attribute.h
@@ -24,17 +24,17 @@ namespace search::attribute {
class ReferenceAttribute : public NotImplementedAttribute
{
public:
- using EntryRef = search::datastore::EntryRef;
+ using EntryRef = vespalib::datastore::EntryRef;
using GlobalId = document::GlobalId;
- using ReferenceStore = datastore::UniqueStore<Reference>;
+ using ReferenceStore = vespalib::datastore::UniqueStore<Reference>;
using ReferenceStoreIndices = vespalib::RcuVectorBase<EntryRef>;
using IndicesCopyVector = vespalib::Array<EntryRef>;
// Class used to map from target lid to source lids
- using ReverseMapping = btree::BTreeStore<uint32_t, btree::BTreeNoLeafData,
- btree::NoAggregated,
+ using ReverseMapping = vespalib::btree::BTreeStore<uint32_t, vespalib::btree::BTreeNoLeafData,
+ vespalib::btree::NoAggregated,
std::less<uint32_t>,
- btree::BTreeDefaultTraits,
- btree::NoAggrCalc>;
+ vespalib::btree::BTreeDefaultTraits,
+ vespalib::btree::NoAggrCalc>;
using TargetLids = ReferenceMappings::TargetLids;
// Class used to map from target lid to source lids
using ReverseMappingRefs = ReferenceMappings::ReverseMappingRefs;
diff --git a/searchlib/src/vespa/searchlib/attribute/reference_attribute_saver.cpp b/searchlib/src/vespa/searchlib/attribute/reference_attribute_saver.cpp
index 4385911d0b3..d3c71796838 100644
--- a/searchlib/src/vespa/searchlib/attribute/reference_attribute_saver.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/reference_attribute_saver.cpp
@@ -8,7 +8,7 @@
using vespalib::GenerationHandler;
using document::GlobalId;
-using search::datastore::EntryRef;
+using vespalib::datastore::EntryRef;
namespace search {
namespace attribute {
diff --git a/searchlib/src/vespa/searchlib/attribute/reference_attribute_saver.h b/searchlib/src/vespa/searchlib/attribute/reference_attribute_saver.h
index 4847663e6e6..ef64ee59954 100644
--- a/searchlib/src/vespa/searchlib/attribute/reference_attribute_saver.h
+++ b/searchlib/src/vespa/searchlib/attribute/reference_attribute_saver.h
@@ -28,7 +28,7 @@ namespace attribute {
class ReferenceAttributeSaver : public AttributeSaver
{
private:
- using EntryRef = search::datastore::EntryRef;
+ using EntryRef = vespalib::datastore::EntryRef;
using GlobalId = document::GlobalId;
using IndicesCopyVector = ReferenceAttribute::IndicesCopyVector;
using Store = ReferenceAttribute::ReferenceStore;
diff --git a/searchlib/src/vespa/searchlib/attribute/reference_mappings.cpp b/searchlib/src/vespa/searchlib/attribute/reference_mappings.cpp
index f0207828d0f..9022bcee7f3 100644
--- a/searchlib/src/vespa/searchlib/attribute/reference_mappings.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/reference_mappings.cpp
@@ -69,7 +69,7 @@ void
ReferenceMappings::addReverseMapping(const Reference &entry, uint32_t lid)
{
EntryRef revMapIdx = entry.revMapIdx();
- ReverseMapping::KeyDataType add(lid, btree::BTreeNoLeafData());
+ ReverseMapping::KeyDataType add(lid, vespalib::btree::BTreeNoLeafData());
_reverseMapping.apply(revMapIdx, &add, &add + 1, nullptr, nullptr);
std::atomic_thread_fence(std::memory_order_release);
entry.setRevMapIdx(revMapIdx);
diff --git a/searchlib/src/vespa/searchlib/attribute/reference_mappings.h b/searchlib/src/vespa/searchlib/attribute/reference_mappings.h
index 8ec997b307e..9923747577f 100644
--- a/searchlib/src/vespa/searchlib/attribute/reference_mappings.h
+++ b/searchlib/src/vespa/searchlib/attribute/reference_mappings.h
@@ -16,14 +16,14 @@ class Reference;
class ReferenceMappings
{
using GenerationHolder = vespalib::GenerationHolder;
- using EntryRef = search::datastore::EntryRef;
+ using EntryRef = vespalib::datastore::EntryRef;
// Classes used to map from target lid to source lids
using ReverseMappingIndices = vespalib::RcuVectorBase<EntryRef>;
- using ReverseMapping = btree::BTreeStore<uint32_t, btree::BTreeNoLeafData,
- btree::NoAggregated,
+ using ReverseMapping = vespalib::btree::BTreeStore<uint32_t, vespalib::btree::BTreeNoLeafData,
+ vespalib::btree::NoAggregated,
std::less<uint32_t>,
- btree::BTreeDefaultTraits,
- btree::NoAggrCalc>;
+ vespalib::btree::BTreeDefaultTraits,
+ vespalib::btree::NoAggrCalc>;
using generation_t = vespalib::GenerationHandler::generation_t;
// Vector containing references to trees of lids referencing given
diff --git a/searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp b/searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp
index 5ad1629e673..ab7a75c4ffc 100644
--- a/searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp
@@ -264,7 +264,7 @@ SingleValueEnumAttribute<B>::clearDocs(DocId lidLow, DocId lidLimit)
assert(lidLow <= lidLimit);
assert(lidLimit <= this->getNumDocs());
for (DocId lid = lidLow; lid < lidLimit; ++lid) {
- if (_enumIndices[lid] != datastore::EntryRef(e)) {
+ if (_enumIndices[lid] != vespalib::datastore::EntryRef(e)) {
this->clearDoc(lid);
}
}
@@ -286,7 +286,7 @@ SingleValueEnumAttribute<B>::onShrinkLidSpace()
}
uint32_t shrink_docs = _enumIndices.size() - committedDocIdLimit;
if (shrink_docs > 0u) {
- datastore::EntryRef default_value_ref(e);
+ vespalib::datastore::EntryRef default_value_ref(e);
assert(default_value_ref.valid());
uint32_t default_value_ref_count = this->_enumStore.get_ref_count(default_value_ref);
assert(default_value_ref_count >= shrink_docs);
diff --git a/searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.h b/searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.h
index bf4cefd562a..634ac7ba024 100644
--- a/searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.h
+++ b/searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.h
@@ -49,7 +49,7 @@ private:
using SelfType = SingleValueNumericPostingAttribute<B>;
using SingleSearchContext = typename SingleValueNumericEnumAttribute<B>::SingleSearchContext;
using SingleNumericSearchContext = SingleSearchContext;
- using SinglePostingSearchContext = attribute::NumericPostingSearchContext<SingleNumericSearchContext, SelfType, btree::BTreeNoLeafData>;
+ using SinglePostingSearchContext = attribute::NumericPostingSearchContext<SingleNumericSearchContext, SelfType, vespalib::btree::BTreeNoLeafData>;
using ValueModifier = typename B::BaseClass::ValueModifier;
using generation_t = typename SingleValueNumericEnumAttribute<B>::generation_t;
@@ -63,7 +63,7 @@ private:
void mergeMemoryStats(vespalib::MemoryUsage & total) override;
void applyUpdateValueChange(const Change & c, EnumStore & enumStore,
std::map<DocId, EnumIndex> & currEnumIndices);
- void makePostingChange(const datastore::EntryComparator *cmp,
+ void makePostingChange(const vespalib::datastore::EntryComparator *cmp,
const std::map<DocId, EnumIndex> &currEnumIndices,
PostingMap &changePost);
diff --git a/searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.hpp b/searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.hpp
index b330be3a2bb..29e9ad39073 100644
--- a/searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.hpp
@@ -53,7 +53,7 @@ SingleValueNumericPostingAttribute<B>::applyUpdateValueChange(const Change & c,
template <typename B>
void
SingleValueNumericPostingAttribute<B>::
-makePostingChange(const datastore::EntryComparator *cmpa,
+makePostingChange(const vespalib::datastore::EntryComparator *cmpa,
const std::map<DocId, EnumIndex> &currEnumIndices,
PostingMap &changePost)
{
diff --git a/searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.h b/searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.h
index 11f85433b74..3ac49ab6921 100644
--- a/searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.h
+++ b/searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.h
@@ -52,7 +52,7 @@ private:
using StringSingleImplSearchContext = typename SingleValueStringAttributeT<B>::StringSingleImplSearchContext;
using StringSinglePostingSearchContext = attribute::StringPostingSearchContext<StringSingleImplSearchContext,
SelfType,
- btree::BTreeNoLeafData>;
+ vespalib::btree::BTreeNoLeafData>;
using ValueModifier = typename SingleValueStringAttributeT<B>::ValueModifier;
using generation_t = typename SingleValueStringAttributeT<B>::generation_t;
@@ -72,7 +72,7 @@ private:
std::map<DocId, EnumIndex> &currEnumIndices);
void
- makePostingChange(const datastore::EntryComparator *cmp,
+ makePostingChange(const vespalib::datastore::EntryComparator *cmp,
Dictionary &dict,
const std::map<DocId, EnumIndex> &currEnumIndices,
PostingMap &changePost);
diff --git a/searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.hpp b/searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.hpp
index cdf1acedb24..e91deb61f36 100644
--- a/searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.hpp
@@ -52,7 +52,7 @@ SingleValueStringPostingAttributeT<B>::applyUpdateValueChange(const Change & c,
template <typename B>
void
SingleValueStringPostingAttributeT<B>::
-makePostingChange(const datastore::EntryComparator *cmpa,
+makePostingChange(const vespalib::datastore::EntryComparator *cmpa,
Dictionary &dict,
const std::map<DocId, EnumIndex> &currEnumIndices,
PostingMap &changePost)
diff --git a/searchlib/src/vespa/searchlib/memoryindex/compact_words_store.cpp b/searchlib/src/vespa/searchlib/memoryindex/compact_words_store.cpp
index b3135efc2bb..ef5c2ea6773 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/compact_words_store.cpp
+++ b/searchlib/src/vespa/searchlib/memoryindex/compact_words_store.cpp
@@ -44,7 +44,7 @@ CompactWordsStore::Builder::Builder(uint32_t docId_)
CompactWordsStore::Builder::~Builder() { }
CompactWordsStore::Builder &
-CompactWordsStore::Builder::insert(datastore::EntryRef wordRef)
+CompactWordsStore::Builder::insert(vespalib::datastore::EntryRef wordRef)
{
_words.push_back(wordRef);
return *this;
@@ -106,7 +106,7 @@ CompactWordsStore::Store::~Store()
_store.dropBuffers();
}
-datastore::EntryRef
+vespalib::datastore::EntryRef
CompactWordsStore::Store::insert(const Builder &builder)
{
size_t serializedSize = getSerializedSize(builder);
@@ -119,7 +119,7 @@ CompactWordsStore::Store::insert(const Builder &builder)
}
CompactWordsStore::Iterator
-CompactWordsStore::Store::get(datastore::EntryRef wordRef) const
+CompactWordsStore::Store::get(vespalib::datastore::EntryRef wordRef) const
{
RefType internalRef(wordRef);
const uint32_t *buf = _store.getEntry<uint32_t>(internalRef);
@@ -136,7 +136,7 @@ CompactWordsStore::~CompactWordsStore() { }
void
CompactWordsStore::insert(const Builder &builder)
{
- datastore::EntryRef wordRef = _wordsStore.insert(builder);
+ vespalib::datastore::EntryRef wordRef = _wordsStore.insert(builder);
auto insres = _docs.insert(std::make_pair(builder.docId(), wordRef));
if (!insres.second) {
LOG(error, "Failed inserting remove info for docid %u",
diff --git a/searchlib/src/vespa/searchlib/memoryindex/compact_words_store.h b/searchlib/src/vespa/searchlib/memoryindex/compact_words_store.h
index 07d7c2e1cce..ff11cd9b841 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/compact_words_store.h
+++ b/searchlib/src/vespa/searchlib/memoryindex/compact_words_store.h
@@ -22,7 +22,7 @@ public:
class Builder {
public:
using UP = std::unique_ptr<Builder>;
- using WordRefVector = vespalib::Array<datastore::EntryRef>;
+ using WordRefVector = vespalib::Array<vespalib::datastore::EntryRef>;
private:
uint32_t _docId;
@@ -31,7 +31,7 @@ public:
public:
Builder(uint32_t docId_);
~Builder();
- Builder &insert(datastore::EntryRef wordRef);
+ Builder &insert(vespalib::datastore::EntryRef wordRef);
uint32_t docId() const { return _docId; }
const WordRefVector &words() const { return _words; }
};
@@ -53,7 +53,7 @@ public:
Iterator(const uint32_t *buf);
bool valid() const { return _valid; }
Iterator &operator++();
- datastore::EntryRef wordRef() const { return datastore::EntryRef(_wordRef); }
+ vespalib::datastore::EntryRef wordRef() const { return vespalib::datastore::EntryRef(_wordRef); }
bool hasBackingBuf() const { return _buf != nullptr; }
};
@@ -62,23 +62,23 @@ public:
*/
class Store {
public:
- using DataStoreType = datastore::DataStoreT<datastore::EntryRefT<22>>;
+ using DataStoreType = vespalib::datastore::DataStoreT<vespalib::datastore::EntryRefT<22>>;
using RefType = DataStoreType::RefType;
private:
DataStoreType _store;
- datastore::BufferType<uint32_t> _type;
+ vespalib::datastore::BufferType<uint32_t> _type;
const uint32_t _typeId;
public:
Store();
~Store();
- datastore::EntryRef insert(const Builder &builder);
- Iterator get(datastore::EntryRef wordRef) const;
+ vespalib::datastore::EntryRef insert(const Builder &builder);
+ Iterator get(vespalib::datastore::EntryRef wordRef) const;
vespalib::MemoryUsage getMemoryUsage() const { return _store.getMemoryUsage(); }
};
- using DocumentWordsMap = vespalib::hash_map<uint32_t, datastore::EntryRef>;
+ using DocumentWordsMap = vespalib::hash_map<uint32_t, vespalib::datastore::EntryRef>;
private:
DocumentWordsMap _docs;
diff --git a/searchlib/src/vespa/searchlib/memoryindex/feature_store.cpp b/searchlib/src/vespa/searchlib/memoryindex/feature_store.cpp
index 1e9cd84a541..73c26ef3fbd 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/feature_store.cpp
+++ b/searchlib/src/vespa/searchlib/memoryindex/feature_store.cpp
@@ -26,7 +26,7 @@ FeatureStore::writeFeatures(uint32_t packedIndex, const DocIdAndFeatures &featur
return oldOffset;
}
-datastore::EntryRef
+vespalib::datastore::EntryRef
FeatureStore::addFeatures(const uint8_t *src, uint64_t byteLen)
{
uint32_t pad = RefType::pad(byteLen);
@@ -42,7 +42,7 @@ FeatureStore::addFeatures(const uint8_t *src, uint64_t byteLen)
return result.ref;
}
-std::pair<datastore::EntryRef, uint64_t>
+std::pair<vespalib::datastore::EntryRef, uint64_t>
FeatureStore::addFeatures(uint64_t beginOffset, uint64_t endOffset)
{
uint64_t bitLen = (endOffset - beginOffset);
@@ -56,8 +56,8 @@ FeatureStore::addFeatures(uint64_t beginOffset, uint64_t endOffset)
return std::make_pair(ref, bitLen);
}
-datastore::EntryRef
-FeatureStore::moveFeatures(datastore::EntryRef ref, uint64_t bitLen)
+vespalib::datastore::EntryRef
+FeatureStore::moveFeatures(vespalib::datastore::EntryRef ref, uint64_t bitLen)
{
const uint8_t *src = getBits(ref);
uint64_t byteLen = (bitLen + 7) / 8;
@@ -96,7 +96,7 @@ FeatureStore::~FeatureStore()
_store.dropBuffers();
}
-std::pair<datastore::EntryRef, uint64_t>
+std::pair<vespalib::datastore::EntryRef, uint64_t>
FeatureStore::addFeatures(uint32_t packedIndex, const DocIdAndFeatures &features)
{
uint64_t oldOffset = writeFeatures(packedIndex, features);
@@ -106,7 +106,7 @@ FeatureStore::addFeatures(uint32_t packedIndex, const DocIdAndFeatures &features
}
void
-FeatureStore::getFeatures(uint32_t packedIndex, datastore::EntryRef ref, DocIdAndFeatures &features)
+FeatureStore::getFeatures(uint32_t packedIndex, vespalib::datastore::EntryRef ref, DocIdAndFeatures &features)
{
setupForField(packedIndex, _d);
setupForReadFeatures(ref, _d);
@@ -114,7 +114,7 @@ FeatureStore::getFeatures(uint32_t packedIndex, datastore::EntryRef ref, DocIdAn
}
size_t
-FeatureStore::bitSize(uint32_t packedIndex, datastore::EntryRef ref)
+FeatureStore::bitSize(uint32_t packedIndex, vespalib::datastore::EntryRef ref)
{
setupForField(packedIndex, _d);
setupForUnpackFeatures(ref, _d);
@@ -126,8 +126,8 @@ FeatureStore::bitSize(uint32_t packedIndex, datastore::EntryRef ref)
return bitLen;
}
-datastore::EntryRef
-FeatureStore::moveFeatures(uint32_t packedIndex, datastore::EntryRef ref)
+vespalib::datastore::EntryRef
+FeatureStore::moveFeatures(uint32_t packedIndex, vespalib::datastore::EntryRef ref)
{
uint64_t bitLen = bitSize(packedIndex, ref);
return moveFeatures(ref, bitLen);
diff --git a/searchlib/src/vespa/searchlib/memoryindex/feature_store.h b/searchlib/src/vespa/searchlib/memoryindex/feature_store.h
index 59683d30c1f..e7fb472d049 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/feature_store.h
+++ b/searchlib/src/vespa/searchlib/memoryindex/feature_store.h
@@ -15,7 +15,7 @@ namespace search::memoryindex {
*/
class FeatureStore {
public:
- using DataStoreType = datastore::DataStoreT<datastore::AlignedEntryRefT<22, 2>>;
+ using DataStoreType = vespalib::datastore::DataStoreT<vespalib::datastore::AlignedEntryRefT<22, 2>>;
using RefType = DataStoreType::RefType;
using EncodeContext = bitcompression::EG2PosOccEncodeContext<true>;
using DecodeContextCooked = bitcompression::EG2PosOccDecodeContextCooked<true>;
@@ -44,7 +44,7 @@ private:
const Schema &_schema;
- datastore::BufferType<uint8_t> _type;
+ vespalib::datastore::BufferType<uint8_t> _type;
const uint32_t _typeId;
/**
@@ -63,7 +63,7 @@ private:
* @param byteLen the byte length of the buffer
* @return the entry ref for the added features
*/
- datastore::EntryRef addFeatures(const uint8_t * src, uint64_t byteLen);
+ vespalib::datastore::EntryRef addFeatures(const uint8_t * src, uint64_t byteLen);
/**
* Adds the features currently in the underlying encode context to the data store.
@@ -72,7 +72,7 @@ private:
* @param endOffset the end offset into the encode context
* @return the entry ref and bit length of the features
*/
- std::pair<datastore::EntryRef, uint64_t> addFeatures(uint64_t beginOffset, uint64_t endOffset);
+ std::pair<vespalib::datastore::EntryRef, uint64_t> addFeatures(uint64_t beginOffset, uint64_t endOffset);
/**
* Moves features to new location, as part of compaction.
@@ -81,7 +81,7 @@ private:
* @param bitLen bit length of features to move
* @return new reference to stored features
*/
- datastore::EntryRef moveFeatures(datastore::EntryRef ref, uint64_t bitLen);
+ vespalib::datastore::EntryRef moveFeatures(vespalib::datastore::EntryRef ref, uint64_t bitLen);
public:
@@ -104,7 +104,7 @@ public:
* @return pair with reference to stored features and
* size of encoded features in bits
*/
- std::pair<datastore::EntryRef, uint64_t> addFeatures(uint32_t packedIndex, const DocIdAndFeatures &features);
+ std::pair<vespalib::datastore::EntryRef, uint64_t> addFeatures(uint32_t packedIndex, const DocIdAndFeatures &features);
/**
@@ -116,7 +116,7 @@ public:
* @param ref Reference to stored features
* @param features The features to be decoded
*/
- void getFeatures(uint32_t packedIndex, datastore::EntryRef ref, DocIdAndFeatures &features);
+ void getFeatures(uint32_t packedIndex, vespalib::datastore::EntryRef ref, DocIdAndFeatures &features);
/**
@@ -135,11 +135,11 @@ public:
* @param ref Reference to stored features
* @param decoder The feature decoder
*/
- void setupForReadFeatures(datastore::EntryRef ref, DecodeContextCooked &decoder) const {
+ void setupForReadFeatures(vespalib::datastore::EntryRef ref, DecodeContextCooked &decoder) const {
const uint8_t * bits = getBits(ref);
decoder.setByteCompr(bits);
uint32_t bufferId = RefType(ref).bufferId();
- const datastore::BufferState &state = _store.getBufferState(bufferId);
+ const vespalib::datastore::BufferState &state = _store.getBufferState(bufferId);
decoder.setEnd(
((_store.getEntry<uint8_t>(RefType(state.size(), bufferId)) -
bits) + 7) / 8,
@@ -152,7 +152,7 @@ public:
* @param ref Reference to stored features
* @param decoder The feature decoder
*/
- void setupForUnpackFeatures(datastore::EntryRef ref, DecodeContextCooked &decoder) const {
+ void setupForUnpackFeatures(vespalib::datastore::EntryRef ref, DecodeContextCooked &decoder) const {
decoder.setByteCompr(getBits(ref));
}
@@ -165,7 +165,7 @@ public:
* @param ref Reference to stored features
* @return size of features in bits
*/
- size_t bitSize(uint32_t packedIndex, datastore::EntryRef ref);
+ size_t bitSize(uint32_t packedIndex, vespalib::datastore::EntryRef ref);
/**
* Get byte address of stored features
@@ -173,7 +173,7 @@ public:
* @param ref Reference to stored features
* @return byte address of stored features
*/
- const uint8_t *getBits(datastore::EntryRef ref) const {
+ const uint8_t *getBits(vespalib::datastore::EntryRef ref) const {
RefType iRef(ref);
return _store.getEntry<uint8_t>(iRef);
}
@@ -185,7 +185,7 @@ public:
* @param ref Old reference to stored features
* @return New reference to stored features
*/
- datastore::EntryRef moveFeatures(uint32_t packedIndex, datastore::EntryRef ref);
+ vespalib::datastore::EntryRef moveFeatures(uint32_t packedIndex, vespalib::datastore::EntryRef ref);
const std::vector<PosOccFieldsParams> &getFieldsParams() const { return _fieldsParams; }
@@ -195,7 +195,7 @@ public:
std::vector<uint32_t> startCompact() { return _store.startCompact(_typeId); }
void finishCompact(const std::vector<uint32_t> & toHold) { _store.finishCompact(toHold); }
vespalib::MemoryUsage getMemoryUsage() const { return _store.getMemoryUsage(); }
- datastore::DataStoreBase::MemStats getMemStats() const { return _store.getMemStats(); }
+ vespalib::datastore::DataStoreBase::MemStats getMemStats() const { return _store.getMemStats(); }
};
}
diff --git a/searchlib/src/vespa/searchlib/memoryindex/field_index.cpp b/searchlib/src/vespa/searchlib/memoryindex/field_index.cpp
index c98b12299c6..bc74725d620 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/field_index.cpp
+++ b/searchlib/src/vespa/searchlib/memoryindex/field_index.cpp
@@ -32,7 +32,7 @@ using vespalib::GenerationHandler;
namespace search::memoryindex {
-using datastore::EntryRef;
+using vespalib::datastore::EntryRef;
template <bool interleaved_features>
FieldIndex<interleaved_features>::FieldIndex(const index::Schema& schema, uint32_t fieldId)
@@ -296,7 +296,7 @@ template class FieldIndex<true>;
using search::memoryindex::FieldIndexBase;
-namespace search::btree {
+namespace vespalib::btree {
template
class BTreeNodeDataWrap<FieldIndexBase::WordKey, BTreeDefaultTraits::LEAF_SLOTS>;
@@ -306,7 +306,7 @@ class BTreeNodeT<FieldIndexBase::WordKey, BTreeDefaultTraits::INTERNAL_SLOTS>;
template
class BTreeNodeTT<FieldIndexBase::WordKey,
- datastore::EntryRef,
+ vespalib::datastore::EntryRef,
NoAggregated,
BTreeDefaultTraits::INTERNAL_SLOTS>;
diff --git a/searchlib/src/vespa/searchlib/memoryindex/field_index.h b/searchlib/src/vespa/searchlib/memoryindex/field_index.h
index 4cd25dc1a1f..65205644d0c 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/field_index.h
+++ b/searchlib/src/vespa/searchlib/memoryindex/field_index.h
@@ -37,11 +37,11 @@ public:
// Mapping from docid -> feature ref
using PostingListEntryType = PostingListEntry<interleaved_features>;
- using PostingList = btree::BTreeRoot<uint32_t, PostingListEntryType, search::btree::NoAggregated>;
- using PostingListStore = btree::BTreeStore<uint32_t, PostingListEntryType,
- search::btree::NoAggregated,
+ using PostingList = vespalib::btree::BTreeRoot<uint32_t, PostingListEntryType, vespalib::btree::NoAggregated>;
+ using PostingListStore = vespalib::btree::BTreeStore<uint32_t, PostingListEntryType,
+ vespalib::btree::NoAggregated,
std::less<uint32_t>,
- btree::BTreeDefaultTraits>;
+ vespalib::btree::BTreeDefaultTraits>;
using PostingListKeyDataType = typename PostingListStore::KeyDataType;
private:
@@ -109,7 +109,7 @@ public:
}
-namespace search::btree {
+namespace vespalib::btree {
extern template
class BTreeNodeDataWrap<search::memoryindex::FieldIndexBase::WordKey,
@@ -121,7 +121,7 @@ class BTreeNodeT<search::memoryindex::FieldIndexBase::WordKey,
extern template
class BTreeNodeTT<search::memoryindex::FieldIndexBase::WordKey,
- datastore::EntryRef,
+ vespalib::datastore::EntryRef,
NoAggregated,
BTreeDefaultTraits::INTERNAL_SLOTS>;
diff --git a/searchlib/src/vespa/searchlib/memoryindex/field_index_base.h b/searchlib/src/vespa/searchlib/memoryindex/field_index_base.h
index 9c6bf823023..ef1fc2244c8 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/field_index_base.h
+++ b/searchlib/src/vespa/searchlib/memoryindex/field_index_base.h
@@ -29,9 +29,9 @@ public:
* Class representing a word used as key in the dictionary.
*/
struct WordKey {
- datastore::EntryRef _wordRef;
+ vespalib::datastore::EntryRef _wordRef;
- explicit WordKey(datastore::EntryRef wordRef) : _wordRef(wordRef) { }
+ explicit WordKey(vespalib::datastore::EntryRef wordRef) : _wordRef(wordRef) { }
WordKey() : _wordRef() { }
friend vespalib::asciistream&
@@ -46,7 +46,7 @@ public:
const WordStore& _wordStore;
const vespalib::stringref _word;
- const char* getWord(datastore::EntryRef wordRef) const {
+ const char* getWord(vespalib::datastore::EntryRef wordRef) const {
if (wordRef.valid()) {
return _wordStore.getWord(wordRef);
}
@@ -66,8 +66,8 @@ public:
};
using PostingListPtr = uint32_t;
- using DictionaryTree = btree::BTree<WordKey, PostingListPtr,
- search::btree::NoAggregated,
+ using DictionaryTree = vespalib::btree::BTree<WordKey, PostingListPtr,
+ vespalib::btree::NoAggregated,
const KeyComp>;
protected:
@@ -88,12 +88,12 @@ protected:
}
public:
- datastore::EntryRef addWord(const vespalib::stringref word) {
+ vespalib::datastore::EntryRef addWord(const vespalib::stringref word) {
_numUniqueWords++;
return _wordStore.addWord(word);
}
- datastore::EntryRef addFeatures(const index::DocIdAndFeatures& features) {
+ vespalib::datastore::EntryRef addFeatures(const index::DocIdAndFeatures& features) {
return _featureStore.addFeatures(_fieldId, features).first;
}
diff --git a/searchlib/src/vespa/searchlib/memoryindex/field_index_remover.cpp b/searchlib/src/vespa/searchlib/memoryindex/field_index_remover.cpp
index 2afddf072f2..ce7c3783c41 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/field_index_remover.cpp
+++ b/searchlib/src/vespa/searchlib/memoryindex/field_index_remover.cpp
@@ -34,7 +34,7 @@ FieldIndexRemover::remove(uint32_t docId, IFieldIndexRemoveListener &listener)
}
void
-FieldIndexRemover::insert(datastore::EntryRef wordRef, uint32_t docId)
+FieldIndexRemover::insert(vespalib::datastore::EntryRef wordRef, uint32_t docId)
{
_wordFieldDocTuples.emplace_back(wordRef, docId);
}
diff --git a/searchlib/src/vespa/searchlib/memoryindex/field_index_remover.h b/searchlib/src/vespa/searchlib/memoryindex/field_index_remover.h
index 19b3353a27a..36d2286cfb1 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/field_index_remover.h
+++ b/searchlib/src/vespa/searchlib/memoryindex/field_index_remover.h
@@ -19,13 +19,13 @@ class WordStore;
class FieldIndexRemover : public IFieldIndexInsertListener {
private:
struct WordFieldDocTuple {
- datastore::EntryRef _wordRef;
+ vespalib::datastore::EntryRef _wordRef;
uint32_t _docId;
WordFieldDocTuple() :
_wordRef(0),
_docId(0)
{ }
- WordFieldDocTuple(datastore::EntryRef wordRef, uint32_t docId) :
+ WordFieldDocTuple(vespalib::datastore::EntryRef wordRef, uint32_t docId) :
_wordRef(wordRef),
_docId(docId)
{ }
@@ -55,7 +55,7 @@ public:
const CompactWordsStore &getStore() const { return _store; }
// Implements IFieldIndexInsertListener
- void insert(datastore::EntryRef wordRef, uint32_t docId) override;
+ void insert(vespalib::datastore::EntryRef wordRef, uint32_t docId) override;
void flush() override;
};
diff --git a/searchlib/src/vespa/searchlib/memoryindex/i_field_index_insert_listener.h b/searchlib/src/vespa/searchlib/memoryindex/i_field_index_insert_listener.h
index 3d349b26d70..40f24dc0af3 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/i_field_index_insert_listener.h
+++ b/searchlib/src/vespa/searchlib/memoryindex/i_field_index_insert_listener.h
@@ -14,7 +14,7 @@ public:
/**
* Called when a {wordRef, docId} tuple is inserted into the field index.
*/
- virtual void insert(datastore::EntryRef wordRef, uint32_t docId) = 0;
+ virtual void insert(vespalib::datastore::EntryRef wordRef, uint32_t docId) = 0;
/**
* Called to process the set of {wordRef, docId} tuples inserted since last flush().
diff --git a/searchlib/src/vespa/searchlib/memoryindex/i_ordered_field_index_inserter.h b/searchlib/src/vespa/searchlib/memoryindex/i_ordered_field_index_inserter.h
index 4da0844da58..138211a6cf5 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/i_ordered_field_index_inserter.h
+++ b/searchlib/src/vespa/searchlib/memoryindex/i_ordered_field_index_inserter.h
@@ -33,7 +33,7 @@ public:
/**
* Returns the reference to the current word (only used by unit tests).
*/
- virtual datastore::EntryRef getWordRef() const = 0;
+ virtual vespalib::datastore::EntryRef getWordRef() const = 0;
/**
* Remove (word, docId) tuple.
diff --git a/searchlib/src/vespa/searchlib/memoryindex/ordered_field_index_inserter.cpp b/searchlib/src/vespa/searchlib/memoryindex/ordered_field_index_inserter.cpp
index 4eda7cf48bd..1a52086d68f 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/ordered_field_index_inserter.cpp
+++ b/searchlib/src/vespa/searchlib/memoryindex/ordered_field_index_inserter.cpp
@@ -54,7 +54,7 @@ OrderedFieldIndexInserter<interleaved_features>::flushWord()
}
//XXX: Feature store leak, removed features not marked dead
PostingListStore &postingListStore(_fieldIndex.getPostingListStore());
- datastore::EntryRef pidx(_dItr.getData());
+ vespalib::datastore::EntryRef pidx(_dItr.getData());
postingListStore.apply(pidx,
&_adds[0],
&_adds[0] + _adds.size(),
@@ -101,11 +101,11 @@ OrderedFieldIndexInserter<interleaved_features>::setNextWord(const vespalib::str
_dItr.binarySeek(key, cmp);
}
if (!_dItr.valid() || cmp(key, _dItr.getKey())) {
- datastore::EntryRef wordRef = _fieldIndex.addWord(_word);
+ vespalib::datastore::EntryRef wordRef = _fieldIndex.addWord(_word);
WordKey insertKey(wordRef);
DictionaryTree &dTree(_fieldIndex.getDictionaryTree());
- dTree.insert(_dItr, insertKey, datastore::EntryRef().ref());
+ dTree.insert(_dItr, insertKey, vespalib::datastore::EntryRef().ref());
}
assert(_dItr.valid());
assert(_word == wordStore.getWord(_dItr.getKey()._wordRef));
@@ -119,7 +119,7 @@ OrderedFieldIndexInserter<interleaved_features>::add(uint32_t docId,
assert(docId != noDocId);
assert(_prevDocId == noDocId || _prevDocId < docId ||
(_prevDocId == docId && !_prevAdd));
- datastore::EntryRef featureRef = _fieldIndex.addFeatures(features);
+ vespalib::datastore::EntryRef featureRef = _fieldIndex.addFeatures(features);
_adds.push_back(PostingListKeyDataType(docId, PostingListEntryType(featureRef,
cap_u16(features.num_occs()),
cap_u16(features.field_length()))));
@@ -151,7 +151,7 @@ OrderedFieldIndexInserter<interleaved_features>::rewind()
}
template <bool interleaved_features>
-datastore::EntryRef
+vespalib::datastore::EntryRef
OrderedFieldIndexInserter<interleaved_features>::getWordRef() const
{
return _dItr.getKey()._wordRef;
diff --git a/searchlib/src/vespa/searchlib/memoryindex/ordered_field_index_inserter.h b/searchlib/src/vespa/searchlib/memoryindex/ordered_field_index_inserter.h
index 0e04b126f32..372ad02834a 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/ordered_field_index_inserter.h
+++ b/searchlib/src/vespa/searchlib/memoryindex/ordered_field_index_inserter.h
@@ -75,7 +75,7 @@ public:
*/
void rewind() override;
- datastore::EntryRef getWordRef() const override;
+ vespalib::datastore::EntryRef getWordRef() const override;
};
}
diff --git a/searchlib/src/vespa/searchlib/memoryindex/posting_iterator.cpp b/searchlib/src/vespa/searchlib/memoryindex/posting_iterator.cpp
index c4d2c335689..99beca41aac 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/posting_iterator.cpp
+++ b/searchlib/src/vespa/searchlib/memoryindex/posting_iterator.cpp
@@ -122,7 +122,7 @@ PostingIterator<interleaved_features, unpack_normal_features, unpack_interleaved
assert(_itr.valid());
assert(docId == _itr.getKey());
if (unpack_normal_features) {
- datastore::EntryRef featureRef(_itr.getData().get_features());
+ vespalib::datastore::EntryRef featureRef(_itr.getData().get_features());
_feature_store.setupForUnpackFeatures(featureRef, _feature_decoder);
_feature_decoder.unpackFeatures(_matchData, docId);
} else {
diff --git a/searchlib/src/vespa/searchlib/memoryindex/posting_list_entry.h b/searchlib/src/vespa/searchlib/memoryindex/posting_list_entry.h
index f58a62ddef5..e27dd0916aa 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/posting_list_entry.h
+++ b/searchlib/src/vespa/searchlib/memoryindex/posting_list_entry.h
@@ -49,10 +49,10 @@ public:
template <bool interleaved_features>
class PostingListEntry : public std::conditional_t<interleaved_features, InterleavedFeatures, NoInterleavedFeatures> {
using ParentType = std::conditional_t<interleaved_features, InterleavedFeatures, NoInterleavedFeatures>;
- mutable datastore::EntryRef _features; // reference to compressed features
+ mutable vespalib::datastore::EntryRef _features; // reference to compressed features
public:
- explicit PostingListEntry(datastore::EntryRef features, uint16_t num_occs, uint16_t field_length)
+ explicit PostingListEntry(vespalib::datastore::EntryRef features, uint16_t num_occs, uint16_t field_length)
: ParentType(num_occs, field_length),
_features(features)
{
@@ -64,14 +64,14 @@ public:
{
}
- datastore::EntryRef get_features() const { return _features; }
+ vespalib::datastore::EntryRef get_features() const { return _features; }
/*
* Reference moved features (used when compacting FeatureStore).
* The moved features must have the same content as the original
* features.
*/
- void update_features(datastore::EntryRef features) const { _features = features; }
+ void update_features(vespalib::datastore::EntryRef features) const { _features = features; }
};
template class PostingListEntry<false>;
diff --git a/searchlib/src/vespa/searchlib/memoryindex/word_store.cpp b/searchlib/src/vespa/searchlib/memoryindex/word_store.cpp
index 0d699395512..1e644ce2533 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/word_store.cpp
+++ b/searchlib/src/vespa/searchlib/memoryindex/word_store.cpp
@@ -25,7 +25,7 @@ WordStore::~WordStore()
_store.dropBuffers();
}
-datastore::EntryRef
+vespalib::datastore::EntryRef
WordStore::addWord(const vespalib::stringref word)
{
size_t wordSize = word.size() + 1;
diff --git a/searchlib/src/vespa/searchlib/memoryindex/word_store.h b/searchlib/src/vespa/searchlib/memoryindex/word_store.h
index 9310910d69c..08b33ed2f81 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/word_store.h
+++ b/searchlib/src/vespa/searchlib/memoryindex/word_store.h
@@ -9,20 +9,20 @@ namespace search::memoryindex {
class WordStore {
public:
- using DataStoreType = datastore::DataStoreT<datastore::AlignedEntryRefT<22, 2>>;
+ using DataStoreType = vespalib::datastore::DataStoreT<vespalib::datastore::AlignedEntryRefT<22, 2>>;
using RefType = DataStoreType::RefType;
private:
DataStoreType _store;
uint32_t _numWords;
- datastore::BufferType<char> _type;
+ vespalib::datastore::BufferType<char> _type;
const uint32_t _typeId;
public:
WordStore();
~WordStore();
- datastore::EntryRef addWord(const vespalib::stringref word);
- const char *getWord(datastore::EntryRef ref) const {
+ vespalib::datastore::EntryRef addWord(const vespalib::stringref word);
+ const char *getWord(vespalib::datastore::EntryRef ref) const {
RefType internalRef(ref);
return _store.getEntry<char>(internalRef);
}
diff --git a/searchlib/src/vespa/searchlib/predicate/common.h b/searchlib/src/vespa/searchlib/predicate/common.h
index 18b5b92a9d5..5ca346647c7 100644
--- a/searchlib/src/vespa/searchlib/predicate/common.h
+++ b/searchlib/src/vespa/searchlib/predicate/common.h
@@ -6,7 +6,7 @@
namespace search::predicate {
-using BTreeSet = btree::BTree<uint32_t, btree::BTreeNoLeafData>;
+using BTreeSet = vespalib::btree::BTree<uint32_t, vespalib::btree::BTreeNoLeafData>;
using ZeroConstraintDocs = BTreeSet::FrozenView;
struct Constants {
diff --git a/searchlib/src/vespa/searchlib/predicate/document_features_store.cpp b/searchlib/src/vespa/searchlib/predicate/document_features_store.cpp
index 8e370a13919..dcda13cac54 100644
--- a/searchlib/src/vespa/searchlib/predicate/document_features_store.cpp
+++ b/searchlib/src/vespa/searchlib/predicate/document_features_store.cpp
@@ -9,8 +9,8 @@
//#include "predicate_index.h"
-using search::btree::BTreeNoLeafData;
-using search::datastore::EntryRef;
+using vespalib::btree::BTreeNoLeafData;
+using vespalib::datastore::EntryRef;
using vespalib::DataBuffer;
using vespalib::stringref;
using std::unordered_map;
@@ -147,8 +147,8 @@ void DocumentFeaturesStore::insert(const PredicateTreeAnnotations &annotations,
for (const auto &range : annotations.range_features) {
stringref word(range.label.data, range.label.size);
KeyComp cmp(_word_store, word);
- auto word_it = _word_index.find(datastore::EntryRef(), cmp);
- datastore::EntryRef ref;
+ auto word_it = _word_index.find(vespalib::datastore::EntryRef(), cmp);
+ vespalib::datastore::EntryRef ref;
if (word_it.valid()) {
ref = word_it.getKey();
} else {
diff --git a/searchlib/src/vespa/searchlib/predicate/document_features_store.h b/searchlib/src/vespa/searchlib/predicate/document_features_store.h
index cca3fa2ef54..a45c7ba043a 100644
--- a/searchlib/src/vespa/searchlib/predicate/document_features_store.h
+++ b/searchlib/src/vespa/searchlib/predicate/document_features_store.h
@@ -20,7 +20,7 @@ namespace search::predicate {
class DocumentFeaturesStore {
typedef memoryindex::WordStore WordStore;
struct Range {
- datastore::EntryRef label_ref;
+ vespalib::datastore::EntryRef label_ref;
int64_t from;
int64_t to;
};
@@ -31,7 +31,7 @@ class DocumentFeaturesStore {
const WordStore &_word_store;
const vespalib::string _word;
- const char *getWord(datastore::EntryRef ref) const {
+ const char *getWord(vespalib::datastore::EntryRef ref) const {
return ref.valid() ? _word_store.getWord(ref) : _word.c_str();
}
@@ -41,8 +41,8 @@ class DocumentFeaturesStore {
_word(word) {
}
- bool operator()(const datastore::EntryRef &lhs,
- const datastore::EntryRef &rhs) const {
+ bool operator()(const vespalib::datastore::EntryRef &lhs,
+ const vespalib::datastore::EntryRef &rhs) const {
return strcmp(getWord(lhs), getWord(rhs)) < 0;
}
};
@@ -50,8 +50,8 @@ class DocumentFeaturesStore {
typedef vespalib::hash_map<uint32_t, FeatureVector> DocumentFeaturesMap;
typedef vespalib::Array<Range> RangeVector;
typedef vespalib::hash_map<uint32_t, RangeVector> RangeFeaturesMap;
- typedef btree::BTree<datastore::EntryRef, btree::BTreeNoLeafData,
- btree::NoAggregated, const KeyComp &> WordIndex;
+ typedef vespalib::btree::BTree<vespalib::datastore::EntryRef, vespalib::btree::BTreeNoLeafData,
+ vespalib::btree::NoAggregated, const KeyComp &> WordIndex;
DocumentFeaturesMap _docs;
RangeFeaturesMap _ranges;
diff --git a/searchlib/src/vespa/searchlib/predicate/predicate_index.cpp b/searchlib/src/vespa/searchlib/predicate/predicate_index.cpp
index 19935d2e339..42a84b4bb85 100644
--- a/searchlib/src/vespa/searchlib/predicate/predicate_index.cpp
+++ b/searchlib/src/vespa/searchlib/predicate/predicate_index.cpp
@@ -9,7 +9,7 @@
#include <vespa/vespalib/btree/btreenodeallocator.hpp>
-using search::datastore::EntryRef;
+using vespalib::datastore::EntryRef;
using vespalib::DataBuffer;
using std::vector;
@@ -32,7 +32,7 @@ void PredicateIndex::indexDocumentFeatures(uint32_t doc_id, const PredicateIndex
for (const auto &map_entry : interval_map) {
uint64_t feature = map_entry.first;
const auto &interval_list = map_entry.second;
- datastore::EntryRef ref = _interval_store.insert(interval_list);
+ vespalib::datastore::EntryRef ref = _interval_store.insert(interval_list);
assert(ref.valid());
addPosting<IntervalT>(feature, doc_id, ref);
_cache.set(feature, doc_id, true);
@@ -114,7 +114,7 @@ PredicateIndex::PredicateIndex(GenerationHandler &generation_handler, Generation
for (size_t i = 0; i < zero_constraint_doc_count; ++i) {
uint32_t raw_id = buffer.readInt32();
uint32_t doc_id = version == 0 ? raw_id >> 6 : raw_id;
- builder.insert(doc_id, btree::BTreeNoLeafData::_instance);
+ builder.insert(doc_id, vespalib::btree::BTreeNoLeafData::_instance);
observer.notifyInsert(0, doc_id, 0);
}
_zero_constraint_docs.assign(builder);
@@ -154,12 +154,12 @@ void PredicateIndex::indexDocument(uint32_t doc_id, const PredicateTreeAnnotatio
void PredicateIndex::indexEmptyDocument(uint32_t doc_id)
{
- _zero_constraint_docs.insert(doc_id, btree::BTreeNoLeafData::_instance);
+ _zero_constraint_docs.insert(doc_id, vespalib::btree::BTreeNoLeafData::_instance);
}
namespace {
void removeFromIndex(
- uint64_t feature, uint32_t doc_id, SimpleIndex<datastore::EntryRef> &index, PredicateIntervalStore &interval_store)
+ uint64_t feature, uint32_t doc_id, SimpleIndex<vespalib::datastore::EntryRef> &index, PredicateIntervalStore &interval_store)
{
auto result = index.removeFromPostingList(feature, doc_id);
if (result.second) { // Posting was removed
@@ -171,7 +171,7 @@ void removeFromIndex(
class DocIdIterator : public PopulateInterface::Iterator {
public:
- using BTreeIterator = SimpleIndex<datastore::EntryRef>::BTreeIterator;
+ using BTreeIterator = SimpleIndex<vespalib::datastore::EntryRef>::BTreeIterator;
DocIdIterator(BTreeIterator it) : _it(it) { }
int32_t getNext() override {
diff --git a/searchlib/src/vespa/searchlib/predicate/predicate_index.h b/searchlib/src/vespa/searchlib/predicate/predicate_index.h
index b0fb0eda4c5..d2ed70694a2 100644
--- a/searchlib/src/vespa/searchlib/predicate/predicate_index.h
+++ b/searchlib/src/vespa/searchlib/predicate/predicate_index.h
@@ -23,8 +23,8 @@ struct PredicateTreeAnnotations;
* posting lists for matching.
*/
class PredicateIndex : public PopulateInterface {
- typedef SimpleIndex<datastore::EntryRef> IntervalIndex;
- typedef SimpleIndex<datastore::EntryRef> BoundsIndex;
+ typedef SimpleIndex<vespalib::datastore::EntryRef> IntervalIndex;
+ typedef SimpleIndex<vespalib::datastore::EntryRef> BoundsIndex;
template <typename IntervalT>
using FeatureMap = std::unordered_map<uint64_t, std::vector<IntervalT>>;
using generation_t = vespalib::GenerationHandler::generation_t;
@@ -35,8 +35,8 @@ public:
typedef std::unique_ptr<PredicateIndex> UP;
typedef vespalib::GenerationHandler GenerationHandler;
typedef vespalib::GenerationHolder GenerationHolder;
- using BTreeIterator = SimpleIndex<datastore::EntryRef>::BTreeIterator;
- using VectorIterator = SimpleIndex<datastore::EntryRef>::VectorIterator;
+ using BTreeIterator = SimpleIndex<vespalib::datastore::EntryRef>::BTreeIterator;
+ using VectorIterator = SimpleIndex<vespalib::datastore::EntryRef>::VectorIterator;
private:
uint32_t _arity;
GenerationHandler &_generation_handler;
@@ -50,7 +50,7 @@ private:
mutable BitVectorCache _cache;
template <typename IntervalT>
- void addPosting(uint64_t feature, uint32_t doc_id, datastore::EntryRef ref);
+ void addPosting(uint64_t feature, uint32_t doc_id, vespalib::datastore::EntryRef ref);
template <typename IntervalT>
void indexDocumentFeatures(uint32_t doc_id, const FeatureMap<IntervalT> &interval_map);
@@ -108,6 +108,6 @@ public:
void adjustDocIdLimit(uint32_t docId);
};
-extern template class SimpleIndex<datastore::EntryRef>;
+extern template class SimpleIndex<vespalib::datastore::EntryRef>;
}
diff --git a/searchlib/src/vespa/searchlib/predicate/predicate_interval_store.cpp b/searchlib/src/vespa/searchlib/predicate/predicate_interval_store.cpp
index 40c1acf6a7d..5c16199dffd 100644
--- a/searchlib/src/vespa/searchlib/predicate/predicate_interval_store.cpp
+++ b/searchlib/src/vespa/searchlib/predicate/predicate_interval_store.cpp
@@ -4,8 +4,8 @@
#include "predicate_interval.h"
#include <vespa/vespalib/datastore/datastore.hpp>
-using search::datastore::BufferState;
-using search::datastore::EntryRef;
+using vespalib::datastore::BufferState;
+using vespalib::datastore::EntryRef;
using std::vector;
namespace search::predicate {
diff --git a/searchlib/src/vespa/searchlib/predicate/predicate_interval_store.h b/searchlib/src/vespa/searchlib/predicate/predicate_interval_store.h
index 8b4eebee9b2..e4573866eb8 100644
--- a/searchlib/src/vespa/searchlib/predicate/predicate_interval_store.h
+++ b/searchlib/src/vespa/searchlib/predicate/predicate_interval_store.h
@@ -17,19 +17,19 @@ struct Interval;
class PredicateIntervalStore {
class DataStoreAdapter;
typedef PredicateRefCache<DataStoreAdapter, 8> RefCacheType;
- typedef datastore::DataStoreT<datastore::EntryRefT<18, 6>> DataStoreType;
+ typedef vespalib::datastore::DataStoreT<vespalib::datastore::EntryRefT<18, 6>> DataStoreType;
typedef DataStoreType::RefType RefType;
using generation_t = vespalib::GenerationHandler::generation_t;
DataStoreType _store;
- datastore::BufferType<uint32_t> _size1Type;
+ vespalib::datastore::BufferType<uint32_t> _size1Type;
class DataStoreAdapter {
const DataStoreType &_store;
public:
DataStoreAdapter(const DataStoreType &store) : _store(store) {}
const uint32_t *getBuffer(uint32_t ref) const {
- RefType entry_ref = datastore::EntryRef(ref);
+ RefType entry_ref = vespalib::datastore::EntryRef(ref);
return _store.getEntry<uint32_t>(entry_ref);
}
};
@@ -59,7 +59,7 @@ public:
* IntervalT is either Interval or IntervalWithBounds.
*/
template <typename IntervalT>
- datastore::EntryRef insert(const std::vector<IntervalT> &intervals);
+ vespalib::datastore::EntryRef insert(const std::vector<IntervalT> &intervals);
/**
* Removes an entry. The entry remains accessible until commit
@@ -69,7 +69,7 @@ public:
* Remove is currently disabled, as the ref cache is assumed to
* keep the total number of different entries low.
*/
- void remove(datastore::EntryRef ref);
+ void remove(vespalib::datastore::EntryRef ref);
void trimHoldLists(generation_t used_generation);
@@ -89,12 +89,12 @@ public:
* single interval optimization.
*/
template <typename IntervalT>
- const IntervalT *get(datastore::EntryRef btree_ref,
+ const IntervalT *get(vespalib::datastore::EntryRef btree_ref,
uint32_t &size_out,
IntervalT *single_buf) const
{
uint32_t size = btree_ref.ref() >> RefCacheType::SIZE_SHIFT;
- RefType data_ref(datastore::EntryRef(btree_ref.ref() & RefCacheType::DATA_REF_MASK));
+ RefType data_ref(vespalib::datastore::EntryRef(btree_ref.ref() & RefCacheType::DATA_REF_MASK));
if (__builtin_expect(size == 0, true)) { // single-interval optimization
*single_buf = IntervalT();
single_buf->interval = data_ref.ref();
diff --git a/searchlib/src/vespa/searchlib/predicate/simple_index.cpp b/searchlib/src/vespa/searchlib/predicate/simple_index.cpp
index 96957008255..364324aeb97 100644
--- a/searchlib/src/vespa/searchlib/predicate/simple_index.cpp
+++ b/searchlib/src/vespa/searchlib/predicate/simple_index.cpp
@@ -24,7 +24,7 @@ void log_debug(vespalib::string &str) {
} // namespace simpleindex
-template class SimpleIndex<datastore::EntryRef>;
+template class SimpleIndex<vespalib::datastore::EntryRef>;
}
diff --git a/searchlib/src/vespa/searchlib/predicate/simple_index.h b/searchlib/src/vespa/searchlib/predicate/simple_index.h
index 986b46d7008..cfc288770c8 100644
--- a/searchlib/src/vespa/searchlib/predicate/simple_index.h
+++ b/searchlib/src/vespa/searchlib/predicate/simple_index.h
@@ -126,13 +126,13 @@ template <typename Posting,
typename Key = uint64_t, typename DocId = uint32_t>
class SimpleIndex {
public:
- using Dictionary = btree::BTree<Key, datastore::EntryRef, btree::NoAggregated>;
+ using Dictionary = vespalib::btree::BTree<Key, vespalib::datastore::EntryRef, vespalib::btree::NoAggregated>;
using DictionaryIterator = typename Dictionary::ConstIterator;
- using BTreeStore = btree::BTreeStore<
- DocId, Posting, btree::NoAggregated, std::less<DocId>, btree::BTreeDefaultTraits>;
+ using BTreeStore = vespalib::btree::BTreeStore<
+ DocId, Posting, vespalib::btree::NoAggregated, std::less<DocId>, vespalib::btree::BTreeDefaultTraits>;
using BTreeIterator = typename BTreeStore::ConstIterator;
using PostingVector = vespalib::RcuVectorBase<Posting>;
- using VectorStore = btree::BTree<Key, std::shared_ptr<PostingVector>, btree::NoAggregated>;
+ using VectorStore = vespalib::btree::BTree<Key, std::shared_ptr<PostingVector>, vespalib::btree::NoAggregated>;
using VectorIterator = PostingVectorIterator<Posting, Key, DocId>;
private:
@@ -149,17 +149,17 @@ private:
const SimpleIndexConfig _config;
const DocIdLimitProvider &_limit_provider;
- void insertIntoPosting(datastore::EntryRef &ref, Key key, DocId doc_id, const Posting &posting);
- void insertIntoVectorPosting(datastore::EntryRef ref, Key key, DocId doc_id, const Posting &posting);
- void removeFromVectorPostingList(datastore::EntryRef ref, Key key, DocId doc_id);
+ void insertIntoPosting(vespalib::datastore::EntryRef &ref, Key key, DocId doc_id, const Posting &posting);
+ void insertIntoVectorPosting(vespalib::datastore::EntryRef ref, Key key, DocId doc_id, const Posting &posting);
+ void removeFromVectorPostingList(vespalib::datastore::EntryRef ref, Key key, DocId doc_id);
void pruneBelowThresholdVectors();
- void createVectorIfOverThreshold(datastore::EntryRef ref, Key key);
- bool removeVectorIfBelowThreshold(datastore::EntryRef ref, typename VectorStore::Iterator &it);
+ void createVectorIfOverThreshold(vespalib::datastore::EntryRef ref, Key key);
+ bool removeVectorIfBelowThreshold(vespalib::datastore::EntryRef ref, typename VectorStore::Iterator &it);
void logVector(const char *action, Key key, size_t document_count,
double ratio, size_t vector_length) const;
double getDocumentRatio(size_t document_count, uint32_t doc_id_limit) const;
- size_t getDocumentCount(datastore::EntryRef ref) const;
+ size_t getDocumentCount(vespalib::datastore::EntryRef ref) const;
bool shouldCreateVectorPosting(size_t size, double ratio) const;
bool shouldRemoveVectorPosting(size_t size, double ratio) const;
size_t getVectorPostingSize(const PostingVector &vector) const {
@@ -191,17 +191,17 @@ public:
void transferHoldLists(generation_t generation);
vespalib::MemoryUsage getMemoryUsage() const;
template <typename FunctionType>
- void foreach_frozen_key(datastore::EntryRef ref, Key key, FunctionType func) const;
+ void foreach_frozen_key(vespalib::datastore::EntryRef ref, Key key, FunctionType func) const;
DictionaryIterator lookup(Key key) const {
return _dictionary.getFrozenView().find(key);
}
- size_t getPostingListSize(datastore::EntryRef ref) const {
+ size_t getPostingListSize(vespalib::datastore::EntryRef ref) const {
return _btree_posting_lists.frozenSize(ref);
}
- BTreeIterator getBTreePostingList(datastore::EntryRef ref) const {
+ BTreeIterator getBTreePostingList(vespalib::datastore::EntryRef ref) const {
return _btree_posting_lists.beginFrozen(ref);
}
@@ -220,7 +220,7 @@ public:
template<typename Posting, typename Key, typename DocId>
template<typename FunctionType>
void SimpleIndex<Posting, Key, DocId>::foreach_frozen_key(
- datastore::EntryRef ref, Key key, FunctionType func) const {
+ vespalib::datastore::EntryRef ref, Key key, FunctionType func) const {
auto it = _vector_posting_lists.getFrozenView().find(key);
double ratio = getDocumentRatio(getDocumentCount(ref), _limit_provider.getDocIdLimit());
if (it.valid() && ratio > _config.foreach_vector_threshold) {
diff --git a/searchlib/src/vespa/searchlib/predicate/simple_index.hpp b/searchlib/src/vespa/searchlib/predicate/simple_index.hpp
index dcf35cd7d33..b49218f1ba6 100644
--- a/searchlib/src/vespa/searchlib/predicate/simple_index.hpp
+++ b/searchlib/src/vespa/searchlib/predicate/simple_index.hpp
@@ -14,7 +14,7 @@ namespace simpleindex {
template <typename Posting, typename Key, typename DocId>
void SimpleIndex<Posting, Key, DocId>::insertIntoPosting(
- datastore::EntryRef &ref, Key key, DocId doc_id, const Posting &posting) {
+ vespalib::datastore::EntryRef &ref, Key key, DocId doc_id, const Posting &posting) {
bool ok = _btree_posting_lists.insert(ref, doc_id, posting);
if (!ok) {
_btree_posting_lists.remove(ref, doc_id);
@@ -27,7 +27,7 @@ void SimpleIndex<Posting, Key, DocId>::insertIntoPosting(
template <typename Posting, typename Key, typename DocId>
void SimpleIndex<Posting, Key, DocId>::insertIntoVectorPosting(
- datastore::EntryRef ref, Key key, DocId doc_id, const Posting &posting) {
+ vespalib::datastore::EntryRef ref, Key key, DocId doc_id, const Posting &posting) {
assert(doc_id < _limit_provider.getDocIdLimit());
auto it = _vector_posting_lists.find(key);
if (it.valid()) {
@@ -45,7 +45,7 @@ SimpleIndex<Posting, Key, DocId>::~SimpleIndex() {
_btree_posting_lists.disableElemHoldList();
for (auto it = _dictionary.begin(); it.valid(); ++it) {
- datastore::EntryRef ref(it.getData());
+ vespalib::datastore::EntryRef ref(it.getData());
if (ref.valid()) {
_btree_posting_lists.clear(ref);
}
@@ -76,7 +76,7 @@ void SimpleIndex<Posting, Key, DocId>::serialize(
assert(sizeof(DocId) <= sizeof(uint32_t));
buffer.writeInt32(_dictionary.size());
for (auto it = _dictionary.begin(); it.valid(); ++it) {
- datastore::EntryRef ref = it.getData();
+ vespalib::datastore::EntryRef ref = it.getData();
buffer.writeInt32(_btree_posting_lists.size(ref)); // 0 if !valid()
auto posting_it = _btree_posting_lists.begin(ref);
if (!posting_it.valid())
@@ -96,7 +96,7 @@ void SimpleIndex<Posting, Key, DocId>::deserialize(
SimpleIndexDeserializeObserver<Key, DocId> &observer, uint32_t version) {
typename Dictionary::Builder builder(_dictionary.getAllocator());
uint32_t size = buffer.readInt32();
- std::vector<btree::BTreeKeyData<DocId, Posting>> postings;
+ std::vector<vespalib::btree::BTreeKeyData<DocId, Posting>> postings;
for (size_t i = 0; i < size; ++i) {
uint32_t posting_size = buffer.readInt32();
if (!posting_size)
@@ -118,7 +118,7 @@ void SimpleIndex<Posting, Key, DocId>::deserialize(
}
postings.emplace_back(doc_id, deserializer.deserialize(buffer));
}
- datastore::EntryRef ref;
+ vespalib::datastore::EntryRef ref;
_btree_posting_lists.apply(ref, &postings[0], &postings[postings.size()],
0, 0);
builder.insert(key, ref);
@@ -131,7 +131,7 @@ template <typename Posting, typename Key, typename DocId>
void SimpleIndex<Posting, Key, DocId>::addPosting(Key key, DocId doc_id,
const Posting &posting) {
auto iter = _dictionary.find(key);
- datastore::EntryRef ref;
+ vespalib::datastore::EntryRef ref;
if (iter.valid()) {
ref = iter.getData();
insertIntoPosting(ref, key, doc_id, posting);
@@ -165,7 +165,7 @@ SimpleIndex<Posting, Key, DocId>::removeFromPostingList(Key key, DocId doc_id) {
}
Posting posting = posting_it.getData();
- datastore::EntryRef original_ref(ref);
+ vespalib::datastore::EntryRef original_ref(ref);
_btree_posting_lists.remove(ref, doc_id);
removeFromVectorPostingList(ref, key, doc_id);
if (!ref.valid()) { // last posting was removed
@@ -179,7 +179,7 @@ SimpleIndex<Posting, Key, DocId>::removeFromPostingList(Key key, DocId doc_id) {
template <typename Posting, typename Key, typename DocId>
void SimpleIndex<Posting, Key, DocId>::removeFromVectorPostingList(
- datastore::EntryRef ref, Key key, DocId doc_id) {
+ vespalib::datastore::EntryRef ref, Key key, DocId doc_id) {
auto it = _vector_posting_lists.find(key);
if (it.valid()) {
if (!removeVectorIfBelowThreshold(ref, it)) {
@@ -227,7 +227,7 @@ void SimpleIndex<Posting, Key, DocId>::logVector(
}
template <typename Posting, typename Key, typename DocId>
-void SimpleIndex<Posting, Key, DocId>::createVectorIfOverThreshold(datastore::EntryRef ref, Key key) {
+void SimpleIndex<Posting, Key, DocId>::createVectorIfOverThreshold(vespalib::datastore::EntryRef ref, Key key) {
uint32_t doc_id_limit = _limit_provider.getDocIdLimit();
size_t size = getDocumentCount(ref);
double ratio = getDocumentRatio(size, doc_id_limit);
@@ -243,7 +243,7 @@ void SimpleIndex<Posting, Key, DocId>::createVectorIfOverThreshold(datastore::En
template <typename Posting, typename Key, typename DocId>
bool SimpleIndex<Posting, Key, DocId>::removeVectorIfBelowThreshold(
- datastore::EntryRef ref, typename VectorStore::Iterator &it) {
+ vespalib::datastore::EntryRef ref, typename VectorStore::Iterator &it) {
size_t size = getDocumentCount(ref);
double ratio = getDocumentRatio(size, _limit_provider.getDocIdLimit());
if (shouldRemoveVectorPosting(size, ratio)) {
@@ -264,7 +264,7 @@ double SimpleIndex<Posting, Key, DocId>::getDocumentRatio(size_t document_count,
};
template <typename Posting, typename Key, typename DocId>
-size_t SimpleIndex<Posting, Key, DocId>::getDocumentCount(datastore::EntryRef ref) const {
+size_t SimpleIndex<Posting, Key, DocId>::getDocumentCount(vespalib::datastore::EntryRef ref) const {
return _btree_posting_lists.size(ref);
};
diff --git a/searchlib/src/vespa/searchlib/queryeval/predicate_blueprint.cpp b/searchlib/src/vespa/searchlib/queryeval/predicate_blueprint.cpp
index 805d3246460..034f57bbb36 100644
--- a/searchlib/src/vespa/searchlib/queryeval/predicate_blueprint.cpp
+++ b/searchlib/src/vespa/searchlib/queryeval/predicate_blueprint.cpp
@@ -34,7 +34,7 @@ typedef PredicateBlueprint::BoundsEntry BoundsEntry;
template <typename Entry>
void pushValueDictionaryEntry(const Entry &entry,
- const SimpleIndex<datastore::EntryRef> &interval_index,
+ const SimpleIndex<vespalib::datastore::EntryRef> &interval_index,
vector<IntervalEntry> &interval_entries) {
const std::string &hash_str = entry.getKey() + "=" + entry.getValue();
uint64_t feature = PredicateHash::hash64(hash_str);
@@ -47,8 +47,8 @@ void pushValueDictionaryEntry(const Entry &entry,
}
struct MyRangeHandler {
- const SimpleIndex<datastore::EntryRef> &interval_index;
- const SimpleIndex<datastore::EntryRef> &bounds_index;
+ const SimpleIndex<vespalib::datastore::EntryRef> &interval_index;
+ const SimpleIndex<vespalib::datastore::EntryRef> &bounds_index;
vector<IntervalEntry> &interval_entries;
vector<BoundsEntry> &bounds_entries;
uint64_t subquery_bitmap;
@@ -83,7 +83,7 @@ void pushRangeDictionaryEntries(
expander.expand(entry.getKey(), entry.getValue(), handler);
}
-void pushZStarPostingList(const SimpleIndex<datastore::EntryRef> &interval_index,
+void pushZStarPostingList(const SimpleIndex<vespalib::datastore::EntryRef> &interval_index,
vector<IntervalEntry> &interval_entries) {
uint64_t feature = Constants::z_star_hash;
auto iterator = interval_index.lookup(feature);
@@ -217,7 +217,7 @@ namespace {
void lookupPostingLists(const std::vector<DictEntry> &dict_entries,
std::vector<VectorIteratorEntry> &vector_iterators,
std::vector<BTreeIteratorEntry> &btree_iterators,
- const SimpleIndex<datastore::EntryRef> &index)
+ const SimpleIndex<vespalib::datastore::EntryRef> &index)
{
for (const auto &entry : dict_entries) {
auto vector_iterator = index.getVectorPostingList(entry.feature);
diff --git a/searchlib/src/vespa/searchlib/queryeval/predicate_blueprint.h b/searchlib/src/vespa/searchlib/queryeval/predicate_blueprint.h
index 3c85978798a..c9a19a0f5bb 100644
--- a/searchlib/src/vespa/searchlib/queryeval/predicate_blueprint.h
+++ b/searchlib/src/vespa/searchlib/queryeval/predicate_blueprint.h
@@ -19,13 +19,13 @@ namespace search::queryeval {
class PredicateBlueprint : public ComplexLeafBlueprint {
public:
struct IntervalEntry {
- datastore::EntryRef entry_ref;
+ vespalib::datastore::EntryRef entry_ref;
uint64_t subquery;
size_t size;
uint64_t feature;
};
struct BoundsEntry {
- datastore::EntryRef entry_ref;
+ vespalib::datastore::EntryRef entry_ref;
uint32_t value_diff;
uint64_t subquery;
size_t size;
@@ -53,8 +53,8 @@ public:
createLeafSearch(const fef::TermFieldMatchDataArray &tfmda,
bool strict) const override;
private:
- using BTreeIterator = predicate::SimpleIndex<datastore::EntryRef>::BTreeIterator;
- using VectorIterator = predicate::SimpleIndex<datastore::EntryRef>::VectorIterator;
+ using BTreeIterator = predicate::SimpleIndex<vespalib::datastore::EntryRef>::BTreeIterator;
+ using VectorIterator = predicate::SimpleIndex<vespalib::datastore::EntryRef>::VectorIterator;
template <typename T>
using optional = std::optional<T>;
using Alloc = vespalib::alloc::Alloc;
@@ -78,7 +78,7 @@ private:
std::vector<IntervalEntry> _interval_dict_entries;
std::vector<BoundsEntry> _bounds_dict_entries;
- datastore::EntryRef _zstar_dict_entry;
+ vespalib::datastore::EntryRef _zstar_dict_entry;
std::vector<IntervalIteratorEntry<BTreeIterator>> _interval_btree_iterators;
std::vector<IntervalIteratorEntry<VectorIterator>> _interval_vector_iterators;
diff --git a/searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp b/searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp
index b026382994b..99afcd92fa6 100644
--- a/searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp
+++ b/searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp
@@ -8,7 +8,7 @@
#include <vespa/eval/tensor/serialization/typed_binary_format.h>
#include <vespa/vespalib/datastore/datastore.hpp>
-using search::datastore::Handle;
+using vespalib::datastore::Handle;
using vespalib::tensor::Tensor;
using vespalib::tensor::DenseTensorView;
using vespalib::tensor::MutableDenseTensorView;
@@ -53,7 +53,7 @@ DenseTensorStore::TensorSizeCalc::alignedSize() const
}
DenseTensorStore::BufferType::BufferType(const TensorSizeCalc &tensorSizeCalc)
- : datastore::BufferType<char>(tensorSizeCalc.alignedSize(), MIN_BUFFER_ARRAYS, RefType::offsetSize())
+ : vespalib::datastore::BufferType<char>(tensorSizeCalc.alignedSize(), MIN_BUFFER_ARRAYS, RefType::offsetSize())
{}
DenseTensorStore::BufferType::~BufferType() = default;
diff --git a/searchlib/src/vespa/searchlib/tensor/dense_tensor_store.h b/searchlib/src/vespa/searchlib/tensor/dense_tensor_store.h
index d5e4152f6d7..75b48da0f25 100644
--- a/searchlib/src/vespa/searchlib/tensor/dense_tensor_store.h
+++ b/searchlib/src/vespa/searchlib/tensor/dense_tensor_store.h
@@ -17,8 +17,8 @@ namespace search::tensor {
class DenseTensorStore : public TensorStore
{
public:
- using RefType = datastore::EntryRefT<22>;
- using DataStoreType = datastore::DataStoreT<RefType>;
+ using RefType = vespalib::datastore::EntryRefT<22>;
+ using DataStoreType = vespalib::datastore::DataStoreT<RefType>;
using ValueType = vespalib::eval::ValueType;
struct TensorSizeCalc
@@ -31,9 +31,9 @@ public:
size_t alignedSize() const;
};
- class BufferType : public datastore::BufferType<char>
+ class BufferType : public vespalib::datastore::BufferType<char>
{
- using CleanContext = datastore::BufferType<char>::CleanContext;
+ using CleanContext = vespalib::datastore::BufferType<char>::CleanContext;
public:
BufferType(const TensorSizeCalc &tensorSizeCalc);
~BufferType() override;
@@ -61,7 +61,7 @@ public:
uint32_t getCellSize() const { return _tensorSizeCalc._cellSize; }
size_t getBufSize() const { return _tensorSizeCalc.bufSize(); }
const void *getRawBuffer(RefType ref) const;
- datastore::Handle<char> allocRawBuffer();
+ vespalib::datastore::Handle<char> allocRawBuffer();
void holdTensor(EntryRef ref) override;
EntryRef move(EntryRef ref) override;
std::unique_ptr<Tensor> getTensor(EntryRef ref) const;
diff --git a/searchlib/src/vespa/searchlib/tensor/generic_tensor_store.cpp b/searchlib/src/vespa/searchlib/tensor/generic_tensor_store.cpp
index ff41396f66b..f19bef3ff21 100644
--- a/searchlib/src/vespa/searchlib/tensor/generic_tensor_store.cpp
+++ b/searchlib/src/vespa/searchlib/tensor/generic_tensor_store.cpp
@@ -10,7 +10,7 @@
#include <vespa/vespalib/util/macro.h>
using document::DeserializeException;
-using search::datastore::Handle;
+using vespalib::datastore::Handle;
using vespalib::tensor::Tensor;
using vespalib::tensor::TypedBinaryFormat;
diff --git a/searchlib/src/vespa/searchlib/tensor/generic_tensor_store.h b/searchlib/src/vespa/searchlib/tensor/generic_tensor_store.h
index 4978b2b0b1d..14b65e1ec5a 100644
--- a/searchlib/src/vespa/searchlib/tensor/generic_tensor_store.h
+++ b/searchlib/src/vespa/searchlib/tensor/generic_tensor_store.h
@@ -18,11 +18,11 @@ namespace tensor {
class GenericTensorStore : public TensorStore
{
public:
- using RefType = datastore::AlignedEntryRefT<22, 2>;
- using DataStoreType = datastore::DataStoreT<RefType>;
+ using RefType = vespalib::datastore::AlignedEntryRefT<22, 2>;
+ using DataStoreType = vespalib::datastore::DataStoreT<RefType>;
private:
DataStoreType _concreteStore;
- datastore::BufferType<char> _bufferType;
+ vespalib::datastore::BufferType<char> _bufferType;
public:
GenericTensorStore();
@@ -30,7 +30,7 @@ public:
std::pair<const void *, uint32_t> getRawBuffer(RefType ref) const;
- datastore::Handle<char> allocRawBuffer(uint32_t size);
+ vespalib::datastore::Handle<char> allocRawBuffer(uint32_t size);
virtual void holdTensor(EntryRef ref) override;
diff --git a/searchlib/src/vespa/searchlib/tensor/hnsw_graph.cpp b/searchlib/src/vespa/searchlib/tensor/hnsw_graph.cpp
index 10113160263..0f58a72e794 100644
--- a/searchlib/src/vespa/searchlib/tensor/hnsw_graph.cpp
+++ b/searchlib/src/vespa/searchlib/tensor/hnsw_graph.cpp
@@ -34,7 +34,7 @@ HnswGraph::remove_node_for_document(uint32_t docid)
{
auto node_ref = node_refs[docid].load_acquire();
nodes.remove(node_ref);
- search::datastore::EntryRef invalid;
+ vespalib::datastore::EntryRef invalid;
node_refs[docid].store_release(invalid);
}
@@ -84,6 +84,6 @@ HnswGraph::histograms() const
namespace vespalib {
-template class RcuVectorBase<search::datastore::AtomicEntryRef>;
+template class RcuVectorBase<vespalib::datastore::AtomicEntryRef>;
}
diff --git a/searchlib/src/vespa/searchlib/tensor/hnsw_graph.h b/searchlib/src/vespa/searchlib/tensor/hnsw_graph.h
index f38f5ca0baf..d1d308def99 100644
--- a/searchlib/src/vespa/searchlib/tensor/hnsw_graph.h
+++ b/searchlib/src/vespa/searchlib/tensor/hnsw_graph.h
@@ -14,11 +14,11 @@ namespace search::tensor {
* that is used for approximate K-nearest neighbor search.
*/
struct HnswGraph {
- using AtomicEntryRef = search::datastore::AtomicEntryRef;
+ using AtomicEntryRef = vespalib::datastore::AtomicEntryRef;
// This uses 10 bits for buffer id -> 1024 buffers.
// As we have very short arrays we get less fragmentation with fewer and larger buffers.
- using EntryRefType = search::datastore::EntryRefT<22>;
+ using EntryRefType = vespalib::datastore::EntryRefT<22>;
// Provides mapping from document id -> node reference.
// The reference is used to lookup the node data in NodeStore.
@@ -26,13 +26,13 @@ struct HnswGraph {
// This stores the level arrays for all nodes.
// Each node consists of an array of levels (from level 0 to n) where each entry is a reference to the link array at that level.
- using NodeStore = search::datastore::ArrayStore<AtomicEntryRef, EntryRefType>;
- using StoreConfig = search::datastore::ArrayStoreConfig;
+ using NodeStore = vespalib::datastore::ArrayStore<AtomicEntryRef, EntryRefType>;
+ using StoreConfig = vespalib::datastore::ArrayStoreConfig;
using LevelArrayRef = NodeStore::ConstArrayRef;
// This stores all link arrays.
// A link array consists of the document ids of the nodes a particular node is linked to.
- using LinkStore = search::datastore::ArrayStore<uint32_t, EntryRefType>;
+ using LinkStore = vespalib::datastore::ArrayStore<uint32_t, EntryRefType>;
using LinkArrayRef = LinkStore::ConstArrayRef;
NodeRefVector node_refs;
diff --git a/searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp b/searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp
index c1f6589b025..612f30cc64f 100644
--- a/searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp
+++ b/searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp
@@ -15,7 +15,7 @@
namespace search::tensor {
using search::StateExplorerUtils;
-using search::datastore::EntryRef;
+using vespalib::datastore::EntryRef;
namespace {
@@ -48,14 +48,14 @@ bool operator< (const PairDist &a, const PairDist &b) {
}
-search::datastore::ArrayStoreConfig
+vespalib::datastore::ArrayStoreConfig
HnswIndex::make_default_node_store_config()
{
return NodeStore::optimizedConfigForHugePage(max_level_array_size, vespalib::alloc::MemoryAllocator::HUGEPAGE_SIZE,
small_page_size, min_num_arrays_for_new_buffer, alloc_grow_factor).enable_free_lists(true);
}
-search::datastore::ArrayStoreConfig
+vespalib::datastore::ArrayStoreConfig
HnswIndex::make_default_link_store_config()
{
return LinkStore::optimizedConfigForHugePage(max_link_array_size, vespalib::alloc::MemoryAllocator::HUGEPAGE_SIZE,
diff --git a/searchlib/src/vespa/searchlib/tensor/hnsw_index.h b/searchlib/src/vespa/searchlib/tensor/hnsw_index.h
index 95001853710..6a7496e8696 100644
--- a/searchlib/src/vespa/searchlib/tensor/hnsw_index.h
+++ b/searchlib/src/vespa/searchlib/tensor/hnsw_index.h
@@ -149,8 +149,8 @@ public:
bool check_link_symmetry() const;
uint32_t count_reachable_nodes() const;
- static search::datastore::ArrayStoreConfig make_default_node_store_config();
- static search::datastore::ArrayStoreConfig make_default_link_store_config();
+ static vespalib::datastore::ArrayStoreConfig make_default_node_store_config();
+ static vespalib::datastore::ArrayStoreConfig make_default_link_store_config();
};
}
diff --git a/searchlib/src/vespa/searchlib/tensor/hnsw_index_saver.h b/searchlib/src/vespa/searchlib/tensor/hnsw_index_saver.h
index d1d8e0db19d..387e35efd8b 100644
--- a/searchlib/src/vespa/searchlib/tensor/hnsw_index_saver.h
+++ b/searchlib/src/vespa/searchlib/tensor/hnsw_index_saver.h
@@ -17,7 +17,7 @@ namespace search::tensor {
**/
class HnswIndexSaver : public NearestNeighborIndexSaver {
public:
- using LevelVector = std::vector<search::datastore::EntryRef>;
+ using LevelVector = std::vector<vespalib::datastore::EntryRef>;
HnswIndexSaver(const HnswGraph &graph);
~HnswIndexSaver();
diff --git a/searchlib/src/vespa/searchlib/tensor/tensor_store.cpp b/searchlib/src/vespa/searchlib/tensor/tensor_store.cpp
index d0ac5017e4d..75f5addcb76 100644
--- a/searchlib/src/vespa/searchlib/tensor/tensor_store.cpp
+++ b/searchlib/src/vespa/searchlib/tensor/tensor_store.cpp
@@ -7,7 +7,7 @@ namespace search {
namespace tensor {
-TensorStore::TensorStore(datastore::DataStoreBase &store)
+TensorStore::TensorStore(vespalib::datastore::DataStoreBase &store)
: _store(store),
_typeId(0)
{
diff --git a/searchlib/src/vespa/searchlib/tensor/tensor_store.h b/searchlib/src/vespa/searchlib/tensor/tensor_store.h
index 4be5701a327..88946086bea 100644
--- a/searchlib/src/vespa/searchlib/tensor/tensor_store.h
+++ b/searchlib/src/vespa/searchlib/tensor/tensor_store.h
@@ -22,16 +22,16 @@ namespace tensor {
class TensorStore
{
public:
- using EntryRef = datastore::EntryRef;
+ using EntryRef = vespalib::datastore::EntryRef;
typedef vespalib::GenerationHandler::generation_t generation_t;
using Tensor = vespalib::tensor::Tensor;
protected:
- datastore::DataStoreBase &_store;
+ vespalib::datastore::DataStoreBase &_store;
const uint32_t _typeId;
public:
- TensorStore(datastore::DataStoreBase &store);
+ TensorStore(vespalib::datastore::DataStoreBase &store);
virtual ~TensorStore();
diff --git a/searchlib/src/vespa/searchlib/test/fakedata/fakememtreeocc.h b/searchlib/src/vespa/searchlib/test/fakedata/fakememtreeocc.h
index 69114611fe6..ed65ae03766 100644
--- a/searchlib/src/vespa/searchlib/test/fakedata/fakememtreeocc.h
+++ b/searchlib/src/vespa/searchlib/test/fakedata/fakememtreeocc.h
@@ -18,7 +18,7 @@ public:
using PostingListEntryType = memoryindex::FieldIndex<false>::PostingListEntryType;
using NodeAllocator = Tree::NodeAllocatorType;
using FeatureStore = memoryindex::FeatureStore;
- using EntryRef = datastore::EntryRef;
+ using EntryRef = vespalib::datastore::EntryRef;
using Schema = index::Schema;
using PosOccFieldsParams = bitcompression::PosOccFieldsParams;
diff --git a/searchlib/src/vespa/searchlib/test/memoryindex/ordered_field_index_inserter.h b/searchlib/src/vespa/searchlib/test/memoryindex/ordered_field_index_inserter.h
index c0ea7be0ce1..4d4f320fbe7 100644
--- a/searchlib/src/vespa/searchlib/test/memoryindex/ordered_field_index_inserter.h
+++ b/searchlib/src/vespa/searchlib/test/memoryindex/ordered_field_index_inserter.h
@@ -78,7 +78,7 @@ public:
}
}
- virtual datastore::EntryRef getWordRef() const override { return datastore::EntryRef(); }
+ virtual vespalib::datastore::EntryRef getWordRef() const override { return vespalib::datastore::EntryRef(); }
virtual void remove(uint32_t docId) override {
addComma();
diff --git a/searchlib/src/vespa/searchlib/test/memoryindex/wrap_inserter.h b/searchlib/src/vespa/searchlib/test/memoryindex/wrap_inserter.h
index 268bf834d21..bb8b14439a7 100644
--- a/searchlib/src/vespa/searchlib/test/memoryindex/wrap_inserter.h
+++ b/searchlib/src/vespa/searchlib/test/memoryindex/wrap_inserter.h
@@ -56,7 +56,7 @@ public:
return *this;
}
- datastore::EntryRef getWordRef() {
+ vespalib::datastore::EntryRef getWordRef() {
return _inserter.getWordRef();
}
};