diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2020-05-04 11:37:01 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@broadpark.no> | 2020-05-04 11:37:01 +0200 |
commit | 12641f4383088dd087c1061739c5765393d2b129 (patch) | |
tree | 7ea647c0e6e646462feb50c46eb0a42d80b20515 | |
parent | 44d195021c1742fdbddfcb6f9afac7fdd993a96a (diff) |
Rename namespace search::btree to vespalib::btree.
Rename namespace search::datastore to vespalib::datastore.
236 files changed, 608 insertions, 608 deletions
diff --git a/searchcore/src/tests/proton/index/indexmanager_test.cpp b/searchcore/src/tests/proton/index/indexmanager_test.cpp index 5b6f7ca9a30..3f088a497aa 100644 --- a/searchcore/src/tests/proton/index/indexmanager_test.cpp +++ b/searchcore/src/tests/proton/index/indexmanager_test.cpp @@ -36,7 +36,7 @@ using search::SerialNum; using search::TuneFileAttributes; using search::TuneFileIndexManager; using search::TuneFileIndexing; -using search::datastore::EntryRef; +using vespalib::datastore::EntryRef; using search::index::DocBuilder; using search::index::DummyFileHeaderContext; using search::index::FieldLengthInfo; diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp index b43efa41d0b..96f69179482 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp @@ -36,7 +36,7 @@ using search::IAttributeSaveTarget; using search::LidUsageStats; using search::attribute::LoadUtils; using search::attribute::SearchContextParams; -using search::btree::BTreeNoLeafData; +using vespalib::btree::BTreeNoLeafData; using search::fef::TermFieldMatchData; using search::queryeval::Blueprint; using search::queryeval::SearchIterator; @@ -1095,7 +1095,7 @@ DocumentMetaStore::foreach(const search::IGidToLidMapperVisitor &visitor) const } // namespace proton -namespace search::btree { +namespace vespalib::btree { template class BTreeIteratorBase<proton::DocumentMetaStore::DocId, BTreeNoLeafData, NoAggregated, BTreeDefaultTraits::INTERNAL_SLOTS, BTreeDefaultTraits::LEAF_SLOTS, BTreeDefaultTraits::PATH_SIZE>; diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h index 57f3458157e..ba462fb070b 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h @@ -63,8 +63,8 @@ private: // Lids are stored as keys in the tree, sorted by their gid // counterpart. The LidGidKeyComparator class maps from lids -> metadata by // using the metadata store. - typedef search::btree::BTree<DocId, search::btree::BTreeNoLeafData, - search::btree::NoAggregated, const KeyComp &> TreeType; + typedef vespalib::btree::BTree<DocId, vespalib::btree::BTreeNoLeafData, + vespalib::btree::NoAggregated, const KeyComp &> TreeType; MetaDataStore _metaDataStore; TreeType _gidToLidMap; @@ -273,7 +273,7 @@ public: } -namespace search::btree { +namespace vespalib::btree { extern template class BTreeIteratorBase<proton::DocumentMetaStore::DocId, BTreeNoLeafData, NoAggregated, BTreeDefaultTraits::INTERNAL_SLOTS, BTreeDefaultTraits::LEAF_SLOTS, BTreeDefaultTraits::PATH_SIZE>; diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoresaver.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoresaver.h index e0a808692ad..e8a6a7929f0 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoresaver.h +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoresaver.h @@ -20,10 +20,10 @@ class DocumentMetaStoreSaver : public search::AttributeSaver public: using KeyComp = documentmetastore::LidGidKeyComparator; using DocId = documentmetastore::IStore::DocId; - using GidIterator = search::btree::BTreeConstIterator< + using GidIterator = vespalib::btree::BTreeConstIterator< DocId, - search::btree::BTreeNoLeafData, - search::btree::NoAggregated, + vespalib::btree::BTreeNoLeafData, + vespalib::btree::NoAggregated, const KeyComp &>; using MetaDataStore = vespalib::RcuVectorBase<RawDocumentMetaData>; diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/i_document_meta_store.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/i_document_meta_store.h index b4e849bd53f..b757d2efb6a 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/i_document_meta_store.h +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/i_document_meta_store.h @@ -34,9 +34,9 @@ struct IDocumentMetaStore : public search::IDocumentMetaStore, // Lids are stored as keys in the tree, sorted by their gid counterpart. // The LidGidKeyComparator class maps from lids -> metadata by using the metadata store. // TODO(geirst): move this typedef and iterator functions away from this interface. - typedef search::btree::BTree<DocId, - search::btree::BTreeNoLeafData, - search::btree::NoAggregated, + typedef vespalib::btree::BTree<DocId, + vespalib::btree::BTreeNoLeafData, + vespalib::btree::NoAggregated, const documentmetastore::LidGidKeyComparator &> TreeType; typedef TreeType::Iterator Iterator; typedef std::shared_ptr<IDocumentMetaStore> SP; 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(); } }; diff --git a/storage/src/vespa/storage/bucketdb/btree_bucket_database.cpp b/storage/src/vespa/storage/bucketdb/btree_bucket_database.cpp index fa2c915acc1..30fa8bb7543 100644 --- a/storage/src/vespa/storage/bucketdb/btree_bucket_database.cpp +++ b/storage/src/vespa/storage/bucketdb/btree_bucket_database.cpp @@ -36,7 +36,7 @@ namespace storage { using Entry = BucketDatabase::Entry; using ConstEntryRef = BucketDatabase::ConstEntryRef; -using search::datastore::EntryRef; +using vespalib::datastore::EntryRef; using vespalib::ConstArrayRef; using document::BucketId; @@ -49,7 +49,7 @@ BTreeBucketDatabase::BTreeBucketDatabase() BTreeBucketDatabase::~BTreeBucketDatabase() = default; -search::datastore::ArrayStoreConfig BTreeBucketDatabase::make_default_array_store_config() { +vespalib::datastore::ArrayStoreConfig BTreeBucketDatabase::make_default_array_store_config() { return ReplicaStore::optimizedConfigForHugePage(1023, vespalib::alloc::MemoryAllocator::HUGEPAGE_SIZE, 4 * 1024, 8 * 1024, 0.2).enable_free_lists(true); } diff --git a/storage/src/vespa/storage/bucketdb/btree_bucket_database.h b/storage/src/vespa/storage/bucketdb/btree_bucket_database.h index 75736e59092..35e248cfc76 100644 --- a/storage/src/vespa/storage/bucketdb/btree_bucket_database.h +++ b/storage/src/vespa/storage/bucketdb/btree_bucket_database.h @@ -26,7 +26,7 @@ namespace storage { // TODO create and use a new DB interface with better bulk loading, snapshot and iteration support class BTreeBucketDatabase : public BucketDatabase { - struct KeyUsedBitsMinMaxAggrCalc : search::btree::MinMaxAggrCalc { + struct KeyUsedBitsMinMaxAggrCalc : vespalib::btree::MinMaxAggrCalc { constexpr static bool aggregate_over_values() { return false; } constexpr static int32_t getVal(uint64_t key) noexcept { static_assert(document::BucketId::CountBits == 6u); @@ -35,12 +35,12 @@ class BTreeBucketDatabase : public BucketDatabase { }; // Mapping from u64: bucket key -> <MSB u32: gc timestamp, LSB u32: ArrayStore ref> - using BTree = search::btree::BTree<uint64_t, uint64_t, - search::btree::MinMaxAggregated, + using BTree = vespalib::btree::BTree<uint64_t, uint64_t, + vespalib::btree::MinMaxAggregated, std::less<>, - search::btree::BTreeDefaultTraits, + vespalib::btree::BTreeDefaultTraits, KeyUsedBitsMinMaxAggrCalc>; - using ReplicaStore = search::datastore::ArrayStore<BucketCopy>; + using ReplicaStore = vespalib::datastore::ArrayStore<BucketCopy>; using GenerationHandler = vespalib::GenerationHandler; BTree _tree; @@ -84,7 +84,7 @@ private: const document::BucketId& bucket, std::vector<Entry>& entries) const; - static search::datastore::ArrayStoreConfig make_default_array_store_config(); + static vespalib::datastore::ArrayStoreConfig make_default_array_store_config(); class ReadGuardImpl : public ReadGuard { const BTreeBucketDatabase* _db; diff --git a/vespalib/src/tests/btree/btree_test.cpp b/vespalib/src/tests/btree/btree_test.cpp index 1b7eb4512ad..848c8a37125 100644 --- a/vespalib/src/tests/btree/btree_test.cpp +++ b/vespalib/src/tests/btree/btree_test.cpp @@ -21,9 +21,9 @@ LOG_SETUP("btree_test"); #include <vespa/vespalib/test/btree/btree_printer.h> using vespalib::GenerationHandler; -using search::datastore::EntryRef; +using vespalib::datastore::EntryRef; -namespace search::btree { +namespace vespalib::btree { namespace { @@ -1521,4 +1521,4 @@ Test::Main() } -TEST_APPHOOK(search::btree::Test); +TEST_APPHOOK(vespalib::btree::Test); diff --git a/vespalib/src/tests/btree/btreeaggregation_test.cpp b/vespalib/src/tests/btree/btreeaggregation_test.cpp index 2b4b37af171..da7f677bb8a 100644 --- a/vespalib/src/tests/btree/btreeaggregation_test.cpp +++ b/vespalib/src/tests/btree/btreeaggregation_test.cpp @@ -27,9 +27,9 @@ LOG_SETUP("btreeaggregation_test"); using vespalib::GenerationHandler; -using search::datastore::EntryRef; +using vespalib::datastore::EntryRef; -namespace search::btree { +namespace vespalib::btree { namespace { @@ -1234,4 +1234,4 @@ Test::Main() } -TEST_APPHOOK(search::btree::Test); +TEST_APPHOOK(vespalib::btree::Test); diff --git a/vespalib/src/tests/btree/frozenbtree_test.cpp b/vespalib/src/tests/btree/frozenbtree_test.cpp index 9bf6f3773eb..e78c1b40dc6 100644 --- a/vespalib/src/tests/btree/frozenbtree_test.cpp +++ b/vespalib/src/tests/btree/frozenbtree_test.cpp @@ -13,14 +13,14 @@ #include <vespa/log/log.h> LOG_SETUP("frozenbtree_test"); -using search::btree::BTreeRoot; -using search::btree::BTreeNode; -using search::btree::BTreeInternalNode; -using search::btree::BTreeLeafNode; -using search::btree::BTreeDefaultTraits; +using vespalib::btree::BTreeRoot; +using vespalib::btree::BTreeNode; +using vespalib::btree::BTreeInternalNode; +using vespalib::btree::BTreeLeafNode; +using vespalib::btree::BTreeDefaultTraits; using vespalib::GenerationHandler; -namespace search { +namespace vespalib { class FrozenBTreeTest : public vespalib::TestApp @@ -468,4 +468,4 @@ FrozenBTreeTest::Main() } -TEST_APPHOOK(search::FrozenBTreeTest); +TEST_APPHOOK(vespalib::FrozenBTreeTest); diff --git a/vespalib/src/tests/btree/iteratespeed.cpp b/vespalib/src/tests/btree/iteratespeed.cpp index e20e9537f7f..e0664b1c588 100644 --- a/vespalib/src/tests/btree/iteratespeed.cpp +++ b/vespalib/src/tests/btree/iteratespeed.cpp @@ -21,7 +21,7 @@ #include <vespa/log/log.h> LOG_SETUP("iteratespeed"); -namespace search::btree { +namespace vespalib::btree { enum class IterateMethod { @@ -204,6 +204,6 @@ IterateSpeed::Main() } -FASTOS_MAIN(search::btree::IterateSpeed); +FASTOS_MAIN(vespalib::btree::IterateSpeed); diff --git a/vespalib/src/tests/datastore/array_store/array_store_test.cpp b/vespalib/src/tests/datastore/array_store/array_store_test.cpp index e74a277d964..ea7c746e58f 100644 --- a/vespalib/src/tests/datastore/array_store/array_store_test.cpp +++ b/vespalib/src/tests/datastore/array_store/array_store_test.cpp @@ -8,12 +8,12 @@ #include <vespa/vespalib/util/traits.h> #include <vector> -using namespace search::datastore; +using namespace vespalib::datastore; using vespalib::MemoryUsage; using vespalib::ArrayRef; using generation_t = vespalib::GenerationHandler::generation_t; -using MemStats = search::datastore::test::MemStats; -using BufferStats = search::datastore::test::BufferStats; +using MemStats = vespalib::datastore::test::MemStats; +using BufferStats = vespalib::datastore::test::BufferStats; constexpr float ALLOC_GROW_FACTOR = 0.2; diff --git a/vespalib/src/tests/datastore/array_store_config/array_store_config_test.cpp b/vespalib/src/tests/datastore/array_store_config/array_store_config_test.cpp index 4779cf1aa70..e90149ed08f 100644 --- a/vespalib/src/tests/datastore/array_store_config/array_store_config_test.cpp +++ b/vespalib/src/tests/datastore/array_store_config/array_store_config_test.cpp @@ -4,7 +4,7 @@ #include <vespa/vespalib/datastore/entryref.h> #include <vespa/vespalib/datastore/array_store_config.h> -using namespace search::datastore; +using namespace vespalib::datastore; using AllocSpec = ArrayStoreConfig::AllocSpec; constexpr float ALLOC_GROW_FACTOR = 0.2; diff --git a/vespalib/src/tests/datastore/buffer_type/buffer_type_test.cpp b/vespalib/src/tests/datastore/buffer_type/buffer_type_test.cpp index 3b748d1d4c7..abcf6d3b4e5 100644 --- a/vespalib/src/tests/datastore/buffer_type/buffer_type_test.cpp +++ b/vespalib/src/tests/datastore/buffer_type/buffer_type_test.cpp @@ -3,7 +3,7 @@ #include <vespa/vespalib/datastore/buffer_type.h> #include <vespa/vespalib/testkit/testapp.h> -using namespace search::datastore; +using namespace vespalib::datastore; using IntBufferType = BufferType<int>; constexpr uint32_t ARRAYS_SIZE(4); diff --git a/vespalib/src/tests/datastore/datastore/datastore_test.cpp b/vespalib/src/tests/datastore/datastore/datastore_test.cpp index 0981280ac23..2429ad3853f 100644 --- a/vespalib/src/tests/datastore/datastore/datastore_test.cpp +++ b/vespalib/src/tests/datastore/datastore/datastore_test.cpp @@ -8,7 +8,7 @@ #include <vespa/log/log.h> LOG_SETUP("datastore_test"); -namespace search::datastore { +namespace vespalib::datastore { using vespalib::alloc::MemoryAllocator; diff --git a/vespalib/src/tests/datastore/unique_store/unique_store_test.cpp b/vespalib/src/tests/datastore/unique_store/unique_store_test.cpp index e4631e28625..fad78ea30ae 100644 --- a/vespalib/src/tests/datastore/unique_store/unique_store_test.cpp +++ b/vespalib/src/tests/datastore/unique_store/unique_store_test.cpp @@ -12,10 +12,10 @@ #include <vespa/log/log.h> LOG_SETUP("unique_store_test"); -using namespace search::datastore; +using namespace vespalib::datastore; using vespalib::ArrayRef; using generation_t = vespalib::GenerationHandler::generation_t; -using search::datastore::test::BufferStats; +using vespalib::datastore::test::BufferStats; template <typename UniqueStoreT> struct TestBase : public ::testing::Test { diff --git a/vespalib/src/tests/datastore/unique_store_dictionary/unique_store_dictionary_test.cpp b/vespalib/src/tests/datastore/unique_store_dictionary/unique_store_dictionary_test.cpp index 1ec89aea69e..37a22108dc5 100644 --- a/vespalib/src/tests/datastore/unique_store_dictionary/unique_store_dictionary_test.cpp +++ b/vespalib/src/tests/datastore/unique_store_dictionary/unique_store_dictionary_test.cpp @@ -7,8 +7,8 @@ #include <vespa/log/log.h> LOG_SETUP("unique_store_dictionary_test"); -using namespace search::datastore; -using namespace search::datastore::uniquestore; +using namespace vespalib::datastore; +using namespace vespalib::datastore::uniquestore; class Comparator : public EntryComparator { private: diff --git a/vespalib/src/tests/datastore/unique_store_string_allocator/unique_store_string_allocator_test.cpp b/vespalib/src/tests/datastore/unique_store_string_allocator/unique_store_string_allocator_test.cpp index 048e1653ee4..94f96cdf707 100644 --- a/vespalib/src/tests/datastore/unique_store_string_allocator/unique_store_string_allocator_test.cpp +++ b/vespalib/src/tests/datastore/unique_store_string_allocator/unique_store_string_allocator_test.cpp @@ -7,10 +7,10 @@ #include <vespa/vespalib/util/traits.h> #include <vector> -using namespace search::datastore; +using namespace vespalib::datastore; using vespalib::MemoryUsage; using generation_t = vespalib::GenerationHandler::generation_t; -using BufferStats = search::datastore::test::BufferStats; +using BufferStats = vespalib::datastore::test::BufferStats; namespace { diff --git a/vespalib/src/vespa/vespalib/btree/btree.h b/vespalib/src/vespa/vespalib/btree/btree.h index 5d20964e169..c7e68901362 100644 --- a/vespalib/src/vespa/vespalib/btree/btree.h +++ b/vespalib/src/vespa/vespalib/btree/btree.h @@ -6,7 +6,7 @@ #include "noaggrcalc.h" #include <vespa/vespalib/util/generationhandler.h> -namespace search::btree { +namespace vespalib::btree { /** * Class that wraps a btree root and an allocator and that provides the same API as diff --git a/vespalib/src/vespa/vespalib/btree/btree.hpp b/vespalib/src/vespa/vespalib/btree/btree.hpp index 7bba2e936f3..4bc96d58144 100644 --- a/vespalib/src/vespa/vespalib/btree/btree.hpp +++ b/vespalib/src/vespa/vespalib/btree/btree.hpp @@ -4,7 +4,7 @@ #include "btree.h" -namespace search::btree { +namespace vespalib::btree { template <typename KeyT, typename DataT, typename AggrT, typename CompareT, typename TraitsT, class AggrCalcT> diff --git a/vespalib/src/vespa/vespalib/btree/btree_key_data.cpp b/vespalib/src/vespa/vespalib/btree/btree_key_data.cpp index f30855e0589..b9d72c207f1 100644 --- a/vespalib/src/vespa/vespalib/btree/btree_key_data.cpp +++ b/vespalib/src/vespa/vespalib/btree/btree_key_data.cpp @@ -2,11 +2,11 @@ #include "btree_key_data.h" -namespace search::btree { +namespace vespalib::btree { BTreeNoLeafData BTreeNoLeafData::_instance; template class BTreeKeyData<uint32_t, uint32_t>; template class BTreeKeyData<uint32_t, int32_t>; -} // namespace search::btree +} // namespace vespalib::btree diff --git a/vespalib/src/vespa/vespalib/btree/btree_key_data.h b/vespalib/src/vespa/vespalib/btree/btree_key_data.h index 737651b755d..dc44faf00a9 100644 --- a/vespalib/src/vespa/vespalib/btree/btree_key_data.h +++ b/vespalib/src/vespa/vespalib/btree/btree_key_data.h @@ -4,7 +4,7 @@ #include <cstdint> -namespace search::btree { +namespace vespalib::btree { /** * Empty class to use as DataT template parameter for BTree classes to @@ -82,4 +82,4 @@ public: extern template class BTreeKeyData<uint32_t, uint32_t>; extern template class BTreeKeyData<uint32_t, int32_t>; -} // namespace search::btree +} // namespace vespalib::btree diff --git a/vespalib/src/vespa/vespalib/btree/btreeaggregator.cpp b/vespalib/src/vespa/vespalib/btree/btreeaggregator.cpp index 2eb627192dc..2cad83577a0 100644 --- a/vespalib/src/vespa/vespalib/btree/btreeaggregator.cpp +++ b/vespalib/src/vespa/vespalib/btree/btreeaggregator.cpp @@ -3,7 +3,7 @@ #include "btreeaggregator.hpp" #include "minmaxaggrcalc.h" -namespace search::btree { +namespace vespalib::btree { template class BTreeAggregator<uint32_t, uint32_t>; template class BTreeAggregator<uint32_t, BTreeNoLeafData>; diff --git a/vespalib/src/vespa/vespalib/btree/btreeaggregator.h b/vespalib/src/vespa/vespalib/btree/btreeaggregator.h index 38c6f579f53..ece6370e5fa 100644 --- a/vespalib/src/vespa/vespalib/btree/btreeaggregator.h +++ b/vespalib/src/vespa/vespalib/btree/btreeaggregator.h @@ -7,7 +7,7 @@ #include "btreetraits.h" #include "noaggrcalc.h" -namespace search::btree { +namespace vespalib::btree { template <typename KeyT, typename DataT, diff --git a/vespalib/src/vespa/vespalib/btree/btreeaggregator.hpp b/vespalib/src/vespa/vespalib/btree/btreeaggregator.hpp index 34dbfd3e899..2a04d7316b7 100644 --- a/vespalib/src/vespa/vespalib/btree/btreeaggregator.hpp +++ b/vespalib/src/vespa/vespalib/btree/btreeaggregator.hpp @@ -4,7 +4,7 @@ #include "btreeaggregator.h" -namespace search::btree { +namespace vespalib::btree { template <typename KeyT, typename DataT, typename AggrT, size_t INTERNAL_SLOTS, size_t LEAF_SLOTS, class AggrCalcT> diff --git a/vespalib/src/vespa/vespalib/btree/btreebuilder.cpp b/vespalib/src/vespa/vespalib/btree/btreebuilder.cpp index 133c5d245c9..3201fb70eee 100644 --- a/vespalib/src/vespa/vespalib/btree/btreebuilder.cpp +++ b/vespalib/src/vespa/vespalib/btree/btreebuilder.cpp @@ -3,7 +3,7 @@ #include "btreenode.hpp" #include "btreebuilder.hpp" -namespace search::btree { +namespace vespalib::btree { template class BTreeBuilder<uint32_t, uint32_t, NoAggregated, BTreeDefaultTraits::INTERNAL_SLOTS, diff --git a/vespalib/src/vespa/vespalib/btree/btreebuilder.h b/vespalib/src/vespa/vespalib/btree/btreebuilder.h index 767f02d03ee..ecc67a6ad6c 100644 --- a/vespalib/src/vespa/vespalib/btree/btreebuilder.h +++ b/vespalib/src/vespa/vespalib/btree/btreebuilder.h @@ -9,7 +9,7 @@ #include "minmaxaggrcalc.h" #include "btreeaggregator.h" -namespace search::btree { +namespace vespalib::btree { template <typename KeyT, typename DataT, diff --git a/vespalib/src/vespa/vespalib/btree/btreebuilder.hpp b/vespalib/src/vespa/vespalib/btree/btreebuilder.hpp index 2cd7d80e06c..0374d46a7c3 100644 --- a/vespalib/src/vespa/vespalib/btree/btreebuilder.hpp +++ b/vespalib/src/vespa/vespalib/btree/btreebuilder.hpp @@ -4,7 +4,7 @@ #include "btreebuilder.h" -namespace search::btree { +namespace vespalib::btree { template <typename KeyT, typename DataT, typename AggrT, size_t INTERNAL_SLOTS, size_t LEAF_SLOTS, class AggrCalcT> diff --git a/vespalib/src/vespa/vespalib/btree/btreeinserter.cpp b/vespalib/src/vespa/vespalib/btree/btreeinserter.cpp index c00d2342eed..7eb786d4ffe 100644 --- a/vespalib/src/vespa/vespalib/btree/btreeinserter.cpp +++ b/vespalib/src/vespa/vespalib/btree/btreeinserter.cpp @@ -6,7 +6,7 @@ #include "btreeinserter.hpp" #include "btreenode.hpp" -namespace search::btree { +namespace vespalib::btree { template class BTreeInserter<uint32_t, uint32_t, NoAggregated>; template class BTreeInserter<uint32_t, BTreeNoLeafData, NoAggregated>; diff --git a/vespalib/src/vespa/vespalib/btree/btreeinserter.h b/vespalib/src/vespa/vespalib/btree/btreeinserter.h index a66a7bc3f92..6fb859e488e 100644 --- a/vespalib/src/vespa/vespalib/btree/btreeinserter.h +++ b/vespalib/src/vespa/vespalib/btree/btreeinserter.h @@ -10,7 +10,7 @@ #include "minmaxaggrcalc.h" #include "btreeiterator.h" -namespace search::btree { +namespace vespalib::btree { template <typename KeyT, typename DataT, diff --git a/vespalib/src/vespa/vespalib/btree/btreeinserter.hpp b/vespalib/src/vespa/vespalib/btree/btreeinserter.hpp index 5c6b02a5a46..434bb0db931 100644 --- a/vespalib/src/vespa/vespalib/btree/btreeinserter.hpp +++ b/vespalib/src/vespa/vespalib/btree/btreeinserter.hpp @@ -7,7 +7,7 @@ #include "btreeiterator.hpp" #include <vespa/vespalib/stllike/asciistream.h> -namespace search::btree { +namespace vespalib::btree { namespace { diff --git a/vespalib/src/vespa/vespalib/btree/btreeiterator.cpp b/vespalib/src/vespa/vespalib/btree/btreeiterator.cpp index 4dfc52304ac..1dc0c6056ba 100644 --- a/vespalib/src/vespa/vespalib/btree/btreeiterator.cpp +++ b/vespalib/src/vespa/vespalib/btree/btreeiterator.cpp @@ -3,7 +3,7 @@ #include "btreeiterator.hpp" #include "btreenode.hpp" -namespace search::btree { +namespace vespalib::btree { template class BTreeIteratorBase<uint32_t, uint32_t, NoAggregated>; template class BTreeIteratorBase<uint32_t, BTreeNoLeafData, NoAggregated>; diff --git a/vespalib/src/vespa/vespalib/btree/btreeiterator.h b/vespalib/src/vespa/vespalib/btree/btreeiterator.h index e3ad2147346..55ab37759ad 100644 --- a/vespalib/src/vespa/vespalib/btree/btreeiterator.h +++ b/vespalib/src/vespa/vespalib/btree/btreeiterator.h @@ -7,7 +7,7 @@ #include "btreetraits.h" #include <vespa/fastos/dynamiclibrary.h> -namespace search::btree { +namespace vespalib::btree { template <typename, typename, typename, typename, typename, class> class BTreeInserter; diff --git a/vespalib/src/vespa/vespalib/btree/btreeiterator.hpp b/vespalib/src/vespa/vespalib/btree/btreeiterator.hpp index 98a14943d36..82864bff057 100644 --- a/vespalib/src/vespa/vespalib/btree/btreeiterator.hpp +++ b/vespalib/src/vespa/vespalib/btree/btreeiterator.hpp @@ -7,7 +7,7 @@ #include "btreenode.hpp" #include <vespa/vespalib/util/hdr_abort.h> -namespace search::btree { +namespace vespalib::btree { template <typename KeyT, typename DataT, typename AggrT, uint32_t INTERNAL_SLOTS, uint32_t LEAF_SLOTS, uint32_t PATH_SIZE> diff --git a/vespalib/src/vespa/vespalib/btree/btreenode.cpp b/vespalib/src/vespa/vespalib/btree/btreenode.cpp index b3d7b60adb6..c723b31d706 100644 --- a/vespalib/src/vespa/vespalib/btree/btreenode.cpp +++ b/vespalib/src/vespa/vespalib/btree/btreenode.cpp @@ -2,7 +2,7 @@ #include "btreenode.hpp" -namespace search::btree { +namespace vespalib::btree { NoAggregated BTreeNodeAggregatedWrap<NoAggregated>::_instance; @@ -25,4 +25,4 @@ template class BTreeLeafNodeTemp<uint32_t, uint32_t, NoAggregated, 16>; template class BTreeLeafNodeTemp<uint32_t, int32_t, MinMaxAggregated, 16>; template class BTreeLeafNodeTemp<uint32_t, BTreeNoLeafData, NoAggregated, 16>; -} // namespace search::btree +} // namespace vespalib::btree diff --git a/vespalib/src/vespa/vespalib/btree/btreenode.h b/vespalib/src/vespa/vespalib/btree/btreenode.h index dd8fe09ec76..b34be33ccf5 100644 --- a/vespalib/src/vespa/vespalib/btree/btreenode.h +++ b/vespalib/src/vespa/vespalib/btree/btreenode.h @@ -11,7 +11,7 @@ #include <utility> #include <cstddef> -namespace search::datastore { +namespace vespalib::datastore { template <typename, typename> class Allocator; template <typename> class BufferType; @@ -22,7 +22,7 @@ template <typename, typename ...> struct Assigner; } -namespace search::btree { +namespace vespalib::btree { template <typename, typename, typename, size_t, size_t> class BTreeNodeAllocator; template <typename, typename, typename, size_t, size_t> class BTreeNodeStore; diff --git a/vespalib/src/vespa/vespalib/btree/btreenode.hpp b/vespalib/src/vespa/vespalib/btree/btreenode.hpp index 421e83a8440..b44315f480a 100644 --- a/vespalib/src/vespa/vespalib/btree/btreenode.hpp +++ b/vespalib/src/vespa/vespalib/btree/btreenode.hpp @@ -5,7 +5,7 @@ #include "btreenode.h" #include <algorithm> -namespace search::btree { +namespace vespalib::btree { namespace { diff --git a/vespalib/src/vespa/vespalib/btree/btreenodeallocator.cpp b/vespalib/src/vespa/vespalib/btree/btreenodeallocator.cpp index 1a05d68b04f..ef9634d4bad 100644 --- a/vespalib/src/vespa/vespalib/btree/btreenodeallocator.cpp +++ b/vespalib/src/vespa/vespalib/btree/btreenodeallocator.cpp @@ -3,9 +3,9 @@ #include "btreenodeallocator.hpp" #include <vespa/vespalib/util/array.hpp> -template class vespalib::Array<search::datastore::EntryRef>; +template class vespalib::Array<vespalib::datastore::EntryRef>; -namespace search::btree { +namespace vespalib::btree { template class BTreeNodeAllocator<uint32_t, uint32_t, NoAggregated, BTreeDefaultTraits::INTERNAL_SLOTS, diff --git a/vespalib/src/vespa/vespalib/btree/btreenodeallocator.h b/vespalib/src/vespa/vespalib/btree/btreenodeallocator.h index d2d2cf44a46..d5814eccbbc 100644 --- a/vespalib/src/vespa/vespalib/btree/btreenodeallocator.h +++ b/vespalib/src/vespa/vespalib/btree/btreenodeallocator.h @@ -10,7 +10,7 @@ #include <vespa/vespalib/util/memoryusage.h> #include <vector> -namespace search::btree { +namespace vespalib::btree { template <typename, typename, typename, size_t, size_t> class BTreeRootBase; diff --git a/vespalib/src/vespa/vespalib/btree/btreenodeallocator.hpp b/vespalib/src/vespa/vespalib/btree/btreenodeallocator.hpp index 197869a7c71..59a7d391563 100644 --- a/vespalib/src/vespa/vespalib/btree/btreenodeallocator.hpp +++ b/vespalib/src/vespa/vespalib/btree/btreenodeallocator.hpp @@ -8,7 +8,7 @@ #include <vespa/vespalib/util/array.hpp> #include "btreenodestore.hpp" -namespace search::btree { +namespace vespalib::btree { template <typename KeyT, typename DataT, typename AggrT, size_t INTERNAL_SLOTS, size_t LEAF_SLOTS> diff --git a/vespalib/src/vespa/vespalib/btree/btreenodestore.cpp b/vespalib/src/vespa/vespalib/btree/btreenodestore.cpp index 1e69dacddce..fd353fa6cd9 100644 --- a/vespalib/src/vespa/vespalib/btree/btreenodestore.cpp +++ b/vespalib/src/vespa/vespalib/btree/btreenodestore.cpp @@ -6,7 +6,7 @@ #include "btreenodeallocator.h" #include <vespa/vespalib/datastore/datastore.h> -namespace search::btree { +namespace vespalib::btree { template class BTreeNodeStore<uint32_t, uint32_t, NoAggregated, BTreeDefaultTraits::INTERNAL_SLOTS, diff --git a/vespalib/src/vespa/vespalib/btree/btreenodestore.h b/vespalib/src/vespa/vespalib/btree/btreenodestore.h index 43522629dbb..c887e436e83 100644 --- a/vespalib/src/vespa/vespalib/btree/btreenodestore.h +++ b/vespalib/src/vespa/vespalib/btree/btreenodestore.h @@ -6,7 +6,7 @@ #include "btreetraits.h" #include <vespa/vespalib/datastore/datastore.h> -namespace search::btree { +namespace vespalib::btree { class BTreeNodeReclaimer { diff --git a/vespalib/src/vespa/vespalib/btree/btreenodestore.hpp b/vespalib/src/vespa/vespalib/btree/btreenodestore.hpp index ebbb57baa16..5a3846416cc 100644 --- a/vespalib/src/vespa/vespalib/btree/btreenodestore.hpp +++ b/vespalib/src/vespa/vespalib/btree/btreenodestore.hpp @@ -5,7 +5,7 @@ #include "btreenodestore.h" #include <vespa/vespalib/datastore/datastore.hpp> -namespace search::btree { +namespace vespalib::btree { template <typename EntryType> void diff --git a/vespalib/src/vespa/vespalib/btree/btreeremover.cpp b/vespalib/src/vespa/vespalib/btree/btreeremover.cpp index f5ada77fed6..5a5b014a817 100644 --- a/vespalib/src/vespa/vespalib/btree/btreeremover.cpp +++ b/vespalib/src/vespa/vespalib/btree/btreeremover.cpp @@ -6,7 +6,7 @@ #include "btreeremover.hpp" #include "btreenode.hpp" -namespace search::btree { +namespace vespalib::btree { template class BTreeRemover<uint32_t, uint32_t, NoAggregated>; template class BTreeRemover<uint32_t, BTreeNoLeafData, NoAggregated>; diff --git a/vespalib/src/vespa/vespalib/btree/btreeremover.h b/vespalib/src/vespa/vespalib/btree/btreeremover.h index bbb825d6299..2a5068f9f6d 100644 --- a/vespalib/src/vespa/vespalib/btree/btreeremover.h +++ b/vespalib/src/vespa/vespalib/btree/btreeremover.h @@ -10,7 +10,7 @@ #include "minmaxaggrcalc.h" #include "btreeiterator.h" -namespace search::btree { +namespace vespalib::btree { template <typename KeyT, typename DataT, diff --git a/vespalib/src/vespa/vespalib/btree/btreeremover.hpp b/vespalib/src/vespa/vespalib/btree/btreeremover.hpp index acb51b18b0c..72923fc5b7b 100644 --- a/vespalib/src/vespa/vespalib/btree/btreeremover.hpp +++ b/vespalib/src/vespa/vespalib/btree/btreeremover.hpp @@ -6,7 +6,7 @@ #include "btreerootbase.hpp" #include <vespa/vespalib/stllike/asciistream.h> -namespace search::btree { +namespace vespalib::btree { template <typename KeyT, typename DataT, typename AggrT, size_t INTERNAL_SLOTS, size_t LEAF_SLOTS, class AggrCalcT> diff --git a/vespalib/src/vespa/vespalib/btree/btreeroot.cpp b/vespalib/src/vespa/vespalib/btree/btreeroot.cpp index a576b6ce1e0..e1dd8c95456 100644 --- a/vespalib/src/vespa/vespalib/btree/btreeroot.cpp +++ b/vespalib/src/vespa/vespalib/btree/btreeroot.cpp @@ -6,7 +6,7 @@ #include "btreeroot.hpp" #include "btreenode.hpp" -namespace search::btree { +namespace vespalib::btree { template class BTreeRootT<uint32_t, uint32_t, NoAggregated>; template class BTreeRootT<uint32_t, BTreeNoLeafData, NoAggregated>; diff --git a/vespalib/src/vespa/vespalib/btree/btreeroot.h b/vespalib/src/vespa/vespalib/btree/btreeroot.h index 471f4273632..28efd00c40b 100644 --- a/vespalib/src/vespa/vespalib/btree/btreeroot.h +++ b/vespalib/src/vespa/vespalib/btree/btreeroot.h @@ -9,7 +9,7 @@ #include "noaggrcalc.h" #include "minmaxaggrcalc.h" -namespace search::btree { +namespace vespalib::btree { template <typename, typename, typename, size_t, size_t> class BTreeNodeAllocator; diff --git a/vespalib/src/vespa/vespalib/btree/btreeroot.hpp b/vespalib/src/vespa/vespalib/btree/btreeroot.hpp index 3893e0e0124..751ffbfca8e 100644 --- a/vespalib/src/vespa/vespalib/btree/btreeroot.hpp +++ b/vespalib/src/vespa/vespalib/btree/btreeroot.hpp @@ -10,7 +10,7 @@ #include "btreeaggregator.hpp" #include <vespa/vespalib/stllike/asciistream.h> -namespace search::btree { +namespace vespalib::btree { //----------------------- BTreeRoot ------------------------------------------// diff --git a/vespalib/src/vespa/vespalib/btree/btreerootbase.cpp b/vespalib/src/vespa/vespalib/btree/btreerootbase.cpp index 12394761bf9..35aa420378c 100644 --- a/vespalib/src/vespa/vespalib/btree/btreerootbase.cpp +++ b/vespalib/src/vespa/vespalib/btree/btreerootbase.cpp @@ -3,7 +3,7 @@ #include "btreerootbase.h" #include "btreerootbase.hpp" -namespace search::btree { +namespace vespalib::btree { template class BTreeRootBase<uint32_t, uint32_t, NoAggregated, BTreeDefaultTraits::INTERNAL_SLOTS, diff --git a/vespalib/src/vespa/vespalib/btree/btreerootbase.h b/vespalib/src/vespa/vespalib/btree/btreerootbase.h index ed4889214ca..1813e6de3d9 100644 --- a/vespalib/src/vespa/vespalib/btree/btreerootbase.h +++ b/vespalib/src/vespa/vespalib/btree/btreerootbase.h @@ -7,7 +7,7 @@ #include "btreenodeallocator.h" #include <atomic> -namespace search::btree { +namespace vespalib::btree { template <typename KeyT, typename DataT, diff --git a/vespalib/src/vespa/vespalib/btree/btreerootbase.hpp b/vespalib/src/vespa/vespalib/btree/btreerootbase.hpp index 0b4ef18aad9..97f84c0ccf3 100644 --- a/vespalib/src/vespa/vespalib/btree/btreerootbase.hpp +++ b/vespalib/src/vespa/vespalib/btree/btreerootbase.hpp @@ -4,7 +4,7 @@ #include "btreerootbase.h" -namespace search::btree { +namespace vespalib::btree { template <typename KeyT, typename DataT, typename AggrT, size_t INTERNAL_SLOTS, size_t LEAF_SLOTS> diff --git a/vespalib/src/vespa/vespalib/btree/btreestore.cpp b/vespalib/src/vespa/vespalib/btree/btreestore.cpp index bead11295b3..9868721da88 100644 --- a/vespalib/src/vespa/vespalib/btree/btreestore.cpp +++ b/vespalib/src/vespa/vespalib/btree/btreestore.cpp @@ -4,7 +4,7 @@ #include "btreestore.hpp" #include "btreeiterator.hpp" -namespace search::btree { +namespace vespalib::btree { template class BTreeStore<uint32_t, uint32_t, NoAggregated, std::less<uint32_t>, BTreeDefaultTraits>; template class BTreeStore<uint32_t, BTreeNoLeafData, NoAggregated, std::less<uint32_t>, BTreeDefaultTraits>; diff --git a/vespalib/src/vespa/vespalib/btree/btreestore.h b/vespalib/src/vespa/vespalib/btree/btreestore.h index 426baf80fa0..dfc4d86aca0 100644 --- a/vespalib/src/vespa/vespalib/btree/btreestore.h +++ b/vespalib/src/vespa/vespalib/btree/btreestore.h @@ -10,7 +10,7 @@ #include <vespa/vespalib/datastore/datastore.h> #include <vespa/vespalib/datastore/handle.h> -namespace search::btree { +namespace vespalib::btree { template <typename KeyT, typename DataT, diff --git a/vespalib/src/vespa/vespalib/btree/btreestore.hpp b/vespalib/src/vespa/vespalib/btree/btreestore.hpp index e6c96600b70..bb7238506ed 100644 --- a/vespalib/src/vespa/vespalib/btree/btreestore.hpp +++ b/vespalib/src/vespa/vespalib/btree/btreestore.hpp @@ -8,7 +8,7 @@ #include <vespa/vespalib/datastore/datastore.hpp> #include <vespa/vespalib/util/optimized.h> -namespace search::btree { +namespace vespalib::btree { template <typename KeyT, typename DataT, typename AggrT, typename CompareT, typename TraitsT, typename AggrCalcT> diff --git a/vespalib/src/vespa/vespalib/btree/btreetraits.h b/vespalib/src/vespa/vespalib/btree/btreetraits.h index efa7cb4de34..6b64049899f 100644 --- a/vespalib/src/vespa/vespalib/btree/btreetraits.h +++ b/vespalib/src/vespa/vespalib/btree/btreetraits.h @@ -4,7 +4,7 @@ #include <cstddef> -namespace search::btree { +namespace vespalib::btree { template <size_t LS, size_t IS, size_t PS, bool BS> struct BTreeTraits { diff --git a/vespalib/src/vespa/vespalib/btree/minmaxaggrcalc.h b/vespalib/src/vespa/vespalib/btree/minmaxaggrcalc.h index 6ef809861b7..8ad03a8270c 100644 --- a/vespalib/src/vespa/vespalib/btree/minmaxaggrcalc.h +++ b/vespalib/src/vespa/vespalib/btree/minmaxaggrcalc.h @@ -4,7 +4,7 @@ #include "minmaxaggregated.h" -namespace search::btree { +namespace vespalib::btree { class MinMaxAggrCalc { diff --git a/vespalib/src/vespa/vespalib/btree/minmaxaggregated.h b/vespalib/src/vespa/vespalib/btree/minmaxaggregated.h index add570a6e6b..ec675f80325 100644 --- a/vespalib/src/vespa/vespalib/btree/minmaxaggregated.h +++ b/vespalib/src/vespa/vespalib/btree/minmaxaggregated.h @@ -5,7 +5,7 @@ #include <limits> #include <cstdint> -namespace search::btree { +namespace vespalib::btree { class MinMaxAggregated { diff --git a/vespalib/src/vespa/vespalib/btree/noaggrcalc.h b/vespalib/src/vespa/vespalib/btree/noaggrcalc.h index 51958229430..ab11e9c689a 100644 --- a/vespalib/src/vespa/vespalib/btree/noaggrcalc.h +++ b/vespalib/src/vespa/vespalib/btree/noaggrcalc.h @@ -4,7 +4,7 @@ #include "noaggregated.h" -namespace search::btree { +namespace vespalib::btree { class NoAggrCalc { diff --git a/vespalib/src/vespa/vespalib/btree/noaggregated.h b/vespalib/src/vespa/vespalib/btree/noaggregated.h index e16465f5e0a..13793c6327f 100644 --- a/vespalib/src/vespa/vespalib/btree/noaggregated.h +++ b/vespalib/src/vespa/vespalib/btree/noaggregated.h @@ -2,7 +2,7 @@ #pragma once -namespace search::btree { +namespace vespalib::btree { class NoAggregated { diff --git a/vespalib/src/vespa/vespalib/datastore/allocator.h b/vespalib/src/vespa/vespalib/datastore/allocator.h index 8a522266c1a..30755a50716 100644 --- a/vespalib/src/vespa/vespalib/datastore/allocator.h +++ b/vespalib/src/vespa/vespalib/datastore/allocator.h @@ -7,7 +7,7 @@ #include "handle.h" #include <vespa/vespalib/util/arrayref.h> -namespace search::datastore { +namespace vespalib::datastore { /** * Allocator used to allocate entries of a specific type in an underlying data store. diff --git a/vespalib/src/vespa/vespalib/datastore/allocator.hpp b/vespalib/src/vespa/vespalib/datastore/allocator.hpp index fa22ba0c3ed..5f84d70e62f 100644 --- a/vespalib/src/vespa/vespalib/datastore/allocator.hpp +++ b/vespalib/src/vespa/vespalib/datastore/allocator.hpp @@ -5,7 +5,7 @@ #include "allocator.h" #include "bufferstate.h" -namespace search::datastore { +namespace vespalib::datastore { template <typename EntryT, typename RefT> Allocator<EntryT, RefT>::Allocator(DataStoreBase &store, uint32_t typeId) diff --git a/vespalib/src/vespa/vespalib/datastore/array_store.h b/vespalib/src/vespa/vespalib/datastore/array_store.h index 4c289c04564..05af192c77f 100644 --- a/vespalib/src/vespa/vespalib/datastore/array_store.h +++ b/vespalib/src/vespa/vespalib/datastore/array_store.h @@ -10,7 +10,7 @@ #include "i_compaction_context.h" #include <vespa/vespalib/util/array.h> -namespace search::datastore { +namespace vespalib::datastore { /** * Datastore for storing arrays of type EntryT that is accessed via a 32-bit EntryRef. diff --git a/vespalib/src/vespa/vespalib/datastore/array_store.hpp b/vespalib/src/vespa/vespalib/datastore/array_store.hpp index 56aa2d5e2c3..d43245db1de 100644 --- a/vespalib/src/vespa/vespalib/datastore/array_store.hpp +++ b/vespalib/src/vespa/vespalib/datastore/array_store.hpp @@ -7,7 +7,7 @@ #include <atomic> #include <algorithm> -namespace search::datastore { +namespace vespalib::datastore { template <typename EntryT, typename RefT> ArrayStore<EntryT, RefT>::LargeArrayType::LargeArrayType(const AllocSpec &spec) diff --git a/vespalib/src/vespa/vespalib/datastore/array_store_config.cpp b/vespalib/src/vespa/vespalib/datastore/array_store_config.cpp index ef3d40b98b2..21d7ed9f114 100644 --- a/vespalib/src/vespa/vespalib/datastore/array_store_config.cpp +++ b/vespalib/src/vespa/vespalib/datastore/array_store_config.cpp @@ -3,7 +3,7 @@ #include "array_store_config.h" #include <cassert> -namespace search::datastore { +namespace vespalib::datastore { ArrayStoreConfig::ArrayStoreConfig(size_t maxSmallArraySize, const AllocSpec &defaultSpec) : _allocSpecs(), diff --git a/vespalib/src/vespa/vespalib/datastore/array_store_config.h b/vespalib/src/vespa/vespalib/datastore/array_store_config.h index fba60f76b6c..fbe70eb2553 100644 --- a/vespalib/src/vespa/vespalib/datastore/array_store_config.h +++ b/vespalib/src/vespa/vespalib/datastore/array_store_config.h @@ -5,7 +5,7 @@ #include <cstddef> #include <vector> -namespace search::datastore { +namespace vespalib::datastore { /** * Config specifying layout and buffer allocation strategy for an array store. diff --git a/vespalib/src/vespa/vespalib/datastore/atomic_entry_ref.h b/vespalib/src/vespa/vespalib/datastore/atomic_entry_ref.h index 154c9669550..ed45723b6ef 100644 --- a/vespalib/src/vespa/vespalib/datastore/atomic_entry_ref.h +++ b/vespalib/src/vespa/vespalib/datastore/atomic_entry_ref.h @@ -5,7 +5,7 @@ #include "entryref.h" #include <atomic> -namespace search::datastore { +namespace vespalib::datastore { /** * A wrapper for std::atomic of type EntryRef that supports copy and move constructors and assignment operator, diff --git a/vespalib/src/vespa/vespalib/datastore/buffer_type.cpp b/vespalib/src/vespa/vespalib/datastore/buffer_type.cpp index e7b878df3a1..ebc1dc5a5b7 100644 --- a/vespalib/src/vespa/vespalib/datastore/buffer_type.cpp +++ b/vespalib/src/vespa/vespalib/datastore/buffer_type.cpp @@ -4,7 +4,7 @@ #include <algorithm> #include <cassert> -namespace search::datastore { +namespace vespalib::datastore { namespace { diff --git a/vespalib/src/vespa/vespalib/datastore/buffer_type.h b/vespalib/src/vespa/vespalib/datastore/buffer_type.h index eb432e6dc76..dbd399a1bcd 100644 --- a/vespalib/src/vespa/vespalib/datastore/buffer_type.h +++ b/vespalib/src/vespa/vespalib/datastore/buffer_type.h @@ -5,7 +5,7 @@ #include <cstdint> #include <cstddef> -namespace search::datastore { +namespace vespalib::datastore { /** * Abstract class used to manage allocation and de-allocation of a specific data type in underlying memory buffers in a data store. diff --git a/vespalib/src/vespa/vespalib/datastore/bufferstate.cpp b/vespalib/src/vespa/vespalib/datastore/bufferstate.cpp index 638117c8c60..acebe8d0db6 100644 --- a/vespalib/src/vespa/vespalib/datastore/bufferstate.cpp +++ b/vespalib/src/vespa/vespalib/datastore/bufferstate.cpp @@ -6,7 +6,7 @@ using vespalib::alloc::Alloc; using vespalib::alloc::MemoryAllocator; -namespace search::datastore { +namespace vespalib::datastore { BufferState::FreeListList::~FreeListList() { diff --git a/vespalib/src/vespa/vespalib/datastore/bufferstate.h b/vespalib/src/vespa/vespalib/datastore/bufferstate.h index 3fe32bb59a1..814b4fe95f7 100644 --- a/vespalib/src/vespa/vespalib/datastore/bufferstate.h +++ b/vespalib/src/vespa/vespalib/datastore/bufferstate.h @@ -8,7 +8,7 @@ #include <vespa/vespalib/util/alloc.h> #include <vespa/vespalib/util/array.h> -namespace search::datastore { +namespace vespalib::datastore { /** * Represents a memory allocated buffer (used in a data store) with its state. diff --git a/vespalib/src/vespa/vespalib/datastore/datastore.cpp b/vespalib/src/vespa/vespalib/datastore/datastore.cpp index 308dc750113..1b2b010c4ed 100644 --- a/vespalib/src/vespa/vespalib/datastore/datastore.cpp +++ b/vespalib/src/vespa/vespalib/datastore/datastore.cpp @@ -5,13 +5,13 @@ #include <vespa/vespalib/util/array.hpp> #include <vespa/vespalib/util/rcuvector.hpp> -namespace search::datastore { +namespace vespalib::datastore { template class DataStoreT<EntryRefT<22> >; } -template void vespalib::Array<search::datastore::DataStoreBase::ElemHold1ListElem>::increase(size_t); -template class vespalib::RcuVector<search::datastore::EntryRef>; -template class vespalib::RcuVectorBase<search::datastore::EntryRef>; -//template void vespalib::RcuVectorBase<search::datastore::EntryRef>::expandAndInsert(const search::datastore::EntryRef &); +template void vespalib::Array<vespalib::datastore::DataStoreBase::ElemHold1ListElem>::increase(size_t); +template class vespalib::RcuVector<vespalib::datastore::EntryRef>; +template class vespalib::RcuVectorBase<vespalib::datastore::EntryRef>; +//template void vespalib::RcuVectorBase<vespalib::datastore::EntryRef>::expandAndInsert(const vespalib::datastore::EntryRef &); diff --git a/vespalib/src/vespa/vespalib/datastore/datastore.h b/vespalib/src/vespa/vespalib/datastore/datastore.h index 6d7376f1b0c..193869a5591 100644 --- a/vespalib/src/vespa/vespalib/datastore/datastore.h +++ b/vespalib/src/vespa/vespalib/datastore/datastore.h @@ -8,7 +8,7 @@ #include "free_list_raw_allocator.h" #include "raw_allocator.h" -namespace search::btree { +namespace vespalib::btree { template<typename EntryType> struct DefaultReclaimer { @@ -19,7 +19,7 @@ struct DefaultReclaimer { } -namespace search::datastore { +namespace vespalib::datastore { /** * Concrete data store using the given EntryRef type to reference stored data. diff --git a/vespalib/src/vespa/vespalib/datastore/datastore.hpp b/vespalib/src/vespa/vespalib/datastore/datastore.hpp index 0e4d1bbe652..6549425b022 100644 --- a/vespalib/src/vespa/vespalib/datastore/datastore.hpp +++ b/vespalib/src/vespa/vespalib/datastore/datastore.hpp @@ -9,7 +9,7 @@ #include "raw_allocator.hpp" #include <vespa/vespalib/util/array.hpp> -namespace search::datastore { +namespace vespalib::datastore { template <typename RefT> DataStoreT<RefT>::DataStoreT() diff --git a/vespalib/src/vespa/vespalib/datastore/datastorebase.cpp b/vespalib/src/vespa/vespalib/datastore/datastorebase.cpp index 2f9dc1dc84a..4e68b10d76a 100644 --- a/vespalib/src/vespa/vespalib/datastore/datastorebase.cpp +++ b/vespalib/src/vespa/vespalib/datastore/datastorebase.cpp @@ -9,7 +9,7 @@ LOG_SETUP(".searchlib.datastore.datastorebase"); using vespalib::GenerationHeldBase; -namespace search::datastore { +namespace vespalib::datastore { namespace { diff --git a/vespalib/src/vespa/vespalib/datastore/datastorebase.h b/vespalib/src/vespa/vespalib/datastore/datastorebase.h index 22b1a53f0ab..a08a210635c 100644 --- a/vespalib/src/vespa/vespalib/datastore/datastorebase.h +++ b/vespalib/src/vespa/vespalib/datastore/datastorebase.h @@ -10,7 +10,7 @@ #include <deque> #include <atomic> -namespace search::datastore { +namespace vespalib::datastore { /** * Abstract class used to store data of potential different types in underlying memory buffers. diff --git a/vespalib/src/vespa/vespalib/datastore/entry_comparator.h b/vespalib/src/vespa/vespalib/datastore/entry_comparator.h index 09b850a4746..d0b5b307a9e 100644 --- a/vespalib/src/vespa/vespalib/datastore/entry_comparator.h +++ b/vespalib/src/vespa/vespalib/datastore/entry_comparator.h @@ -4,7 +4,7 @@ #include "entryref.h" -namespace search::datastore { +namespace vespalib::datastore { /** * Less-than comparator for two entries based on entry refs. diff --git a/vespalib/src/vespa/vespalib/datastore/entry_comparator_wrapper.h b/vespalib/src/vespa/vespalib/datastore/entry_comparator_wrapper.h index c84f81f9d6e..199d074b453 100644 --- a/vespalib/src/vespa/vespalib/datastore/entry_comparator_wrapper.h +++ b/vespalib/src/vespa/vespalib/datastore/entry_comparator_wrapper.h @@ -4,7 +4,7 @@ #include "entry_comparator.h" -namespace search::datastore { +namespace vespalib::datastore { /* * Copyable comparator wrapper. diff --git a/vespalib/src/vespa/vespalib/datastore/entryref.cpp b/vespalib/src/vespa/vespalib/datastore/entryref.cpp index e90afb877bd..0551e617283 100644 --- a/vespalib/src/vespa/vespalib/datastore/entryref.cpp +++ b/vespalib/src/vespa/vespalib/datastore/entryref.cpp @@ -3,7 +3,7 @@ #include "entryref.hpp" #include <vespa/vespalib/stllike/asciistream.h> -namespace search::datastore { +namespace vespalib::datastore { template EntryRefT<24u, 8u>::EntryRefT(size_t, uint32_t); template EntryRefT<31u, 1u>::EntryRefT(size_t, uint32_t); diff --git a/vespalib/src/vespa/vespalib/datastore/entryref.h b/vespalib/src/vespa/vespalib/datastore/entryref.h index d49b1ab9071..51a4e0699fc 100644 --- a/vespalib/src/vespa/vespalib/datastore/entryref.h +++ b/vespalib/src/vespa/vespalib/datastore/entryref.h @@ -7,7 +7,7 @@ namespace vespalib { class asciistream; } -namespace search::datastore { +namespace vespalib::datastore { class EntryRef { protected: diff --git a/vespalib/src/vespa/vespalib/datastore/entryref.hpp b/vespalib/src/vespa/vespalib/datastore/entryref.hpp index b7aafb30fdd..56ebe62dfab 100644 --- a/vespalib/src/vespa/vespalib/datastore/entryref.hpp +++ b/vespalib/src/vespa/vespalib/datastore/entryref.hpp @@ -5,7 +5,7 @@ #include "entryref.h" #include <vespa/vespalib/util/assert.h> -namespace search::datastore { +namespace vespalib::datastore { template <uint32_t OffsetBits, uint32_t BufferBits> EntryRefT<OffsetBits, BufferBits>::EntryRefT(size_t offset_, uint32_t bufferId_) : diff --git a/vespalib/src/vespa/vespalib/datastore/free_list_allocator.h b/vespalib/src/vespa/vespalib/datastore/free_list_allocator.h index a23cb71b90c..ae8b1bb1c72 100644 --- a/vespalib/src/vespa/vespalib/datastore/free_list_allocator.h +++ b/vespalib/src/vespa/vespalib/datastore/free_list_allocator.h @@ -4,7 +4,7 @@ #include "allocator.h" -namespace search::datastore { +namespace vespalib::datastore { /** * Allocator used to allocate entries of a specific type in an underlying data store diff --git a/vespalib/src/vespa/vespalib/datastore/free_list_allocator.hpp b/vespalib/src/vespa/vespalib/datastore/free_list_allocator.hpp index 402fbe26725..32ae33a56c0 100644 --- a/vespalib/src/vespa/vespalib/datastore/free_list_allocator.hpp +++ b/vespalib/src/vespa/vespalib/datastore/free_list_allocator.hpp @@ -5,7 +5,7 @@ #include "free_list_allocator.h" #include "bufferstate.h" -namespace search::datastore { +namespace vespalib::datastore { template <typename EntryT, typename RefT, typename ReclaimerT> FreeListAllocator<EntryT, RefT, ReclaimerT>::FreeListAllocator(DataStoreBase &store, uint32_t typeId) diff --git a/vespalib/src/vespa/vespalib/datastore/free_list_raw_allocator.h b/vespalib/src/vespa/vespalib/datastore/free_list_raw_allocator.h index 514eecc25a8..b6eec5b9742 100644 --- a/vespalib/src/vespa/vespalib/datastore/free_list_raw_allocator.h +++ b/vespalib/src/vespa/vespalib/datastore/free_list_raw_allocator.h @@ -4,7 +4,7 @@ #include "raw_allocator.h" -namespace search::datastore { +namespace vespalib::datastore { /** * Allocator used to allocate raw buffers (EntryT *) in an underlying data store diff --git a/vespalib/src/vespa/vespalib/datastore/free_list_raw_allocator.hpp b/vespalib/src/vespa/vespalib/datastore/free_list_raw_allocator.hpp index 0e97d6a3c33..5679f3a849b 100644 --- a/vespalib/src/vespa/vespalib/datastore/free_list_raw_allocator.hpp +++ b/vespalib/src/vespa/vespalib/datastore/free_list_raw_allocator.hpp @@ -4,7 +4,7 @@ #include "free_list_raw_allocator.h" -namespace search::datastore { +namespace vespalib::datastore { template <typename EntryT, typename RefT> FreeListRawAllocator<EntryT, RefT>::FreeListRawAllocator(DataStoreBase &store, uint32_t typeId) diff --git a/vespalib/src/vespa/vespalib/datastore/handle.h b/vespalib/src/vespa/vespalib/datastore/handle.h index 49eb4843816..46908325ad9 100644 --- a/vespalib/src/vespa/vespalib/datastore/handle.h +++ b/vespalib/src/vespa/vespalib/datastore/handle.h @@ -4,7 +4,7 @@ #include "entryref.h" -namespace search::datastore { +namespace vespalib::datastore { /** * Handle to data allocated in a data store and a EntryRef used for read-only access to data later. diff --git a/vespalib/src/vespa/vespalib/datastore/i_compactable.h b/vespalib/src/vespa/vespalib/datastore/i_compactable.h index 599b2adfa20..d676acfb5a7 100644 --- a/vespalib/src/vespa/vespalib/datastore/i_compactable.h +++ b/vespalib/src/vespa/vespalib/datastore/i_compactable.h @@ -2,7 +2,7 @@ #pragma once -namespace search::datastore { +namespace vespalib::datastore { /** * Interface for moving an entry as part of compaction of data in old diff --git a/vespalib/src/vespa/vespalib/datastore/i_compaction_context.h b/vespalib/src/vespa/vespalib/datastore/i_compaction_context.h index aa537968f1c..72b473adf4a 100644 --- a/vespalib/src/vespa/vespalib/datastore/i_compaction_context.h +++ b/vespalib/src/vespa/vespalib/datastore/i_compaction_context.h @@ -4,7 +4,7 @@ #include <vespa/vespalib/util/array.h> -namespace search::datastore { +namespace vespalib::datastore { /** * A compaction context is used when performing a compaction of data buffers in a data store. diff --git a/vespalib/src/vespa/vespalib/datastore/i_unique_store_dictionary.h b/vespalib/src/vespa/vespalib/datastore/i_unique_store_dictionary.h index 9604d1d5339..6b9a4f7201e 100644 --- a/vespalib/src/vespa/vespalib/datastore/i_unique_store_dictionary.h +++ b/vespalib/src/vespa/vespalib/datastore/i_unique_store_dictionary.h @@ -8,7 +8,7 @@ #include <vespa/vespalib/util/memoryusage.h> #include <functional> -namespace search::datastore { +namespace vespalib::datastore { class EntryComparator; struct ICompactable; diff --git a/vespalib/src/vespa/vespalib/datastore/raw_allocator.h b/vespalib/src/vespa/vespalib/datastore/raw_allocator.h index b7c00f75580..e09639f08e9 100644 --- a/vespalib/src/vespa/vespalib/datastore/raw_allocator.h +++ b/vespalib/src/vespa/vespalib/datastore/raw_allocator.h @@ -6,7 +6,7 @@ #include "entryref.h" #include "handle.h" -namespace search::datastore { +namespace vespalib::datastore { /** * Allocator used to allocate raw buffers (EntryT *) in an underlying data store diff --git a/vespalib/src/vespa/vespalib/datastore/raw_allocator.hpp b/vespalib/src/vespa/vespalib/datastore/raw_allocator.hpp index 9b86305a634..43a793d69f7 100644 --- a/vespalib/src/vespa/vespalib/datastore/raw_allocator.hpp +++ b/vespalib/src/vespa/vespalib/datastore/raw_allocator.hpp @@ -5,7 +5,7 @@ #include "raw_allocator.h" #include "bufferstate.h" -namespace search::datastore { +namespace vespalib::datastore { template <typename EntryT, typename RefT> RawAllocator<EntryT, RefT>::RawAllocator(DataStoreBase &store, uint32_t typeId) diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store.h b/vespalib/src/vespa/vespalib/datastore/unique_store.h index 5758c7e3481..a47792de402 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store.h +++ b/vespalib/src/vespa/vespalib/datastore/unique_store.h @@ -13,7 +13,7 @@ #include "unique_store_comparator.h" #include "unique_store_entry.h" -namespace search::datastore { +namespace vespalib::datastore { template <typename Allocator> class UniqueStoreBuilder; diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store.hpp b/vespalib/src/vespa/vespalib/datastore/unique_store.hpp index 956d4c16d40..8b9525f5ad7 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store.hpp +++ b/vespalib/src/vespa/vespalib/datastore/unique_store.hpp @@ -13,7 +13,7 @@ #include <atomic> #include <algorithm> -namespace search::datastore { +namespace vespalib::datastore { namespace uniquestore { diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_add_result.h b/vespalib/src/vespa/vespalib/datastore/unique_store_add_result.h index eee5dbb535f..cc5f57e11a1 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_add_result.h +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_add_result.h @@ -5,7 +5,7 @@ #include "entryref.h" -namespace search::datastore { +namespace vespalib::datastore { /* * Representation of result of adding a value to unique store. diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_allocator.h b/vespalib/src/vespa/vespalib/datastore/unique_store_allocator.h index a4443742e33..8f81fec6554 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_allocator.h +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_allocator.h @@ -8,7 +8,7 @@ #include "unique_store_entry.h" #include "i_compactable.h" -namespace search::datastore { +namespace vespalib::datastore { /** * Allocator for unique values of type EntryT that is accessed via a diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_allocator.hpp b/vespalib/src/vespa/vespalib/datastore/unique_store_allocator.hpp index 83772224713..b54c54e9bcc 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_allocator.hpp +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_allocator.hpp @@ -6,7 +6,7 @@ #include "unique_store_value_filter.h" #include "datastore.hpp" -namespace search::datastore { +namespace vespalib::datastore { constexpr size_t NUM_ARRAYS_FOR_NEW_UNIQUESTORE_BUFFER = 1024u; constexpr float ALLOC_GROW_FACTOR = 0.2; diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_builder.h b/vespalib/src/vespa/vespalib/datastore/unique_store_builder.h index c0a44855063..f2be4e1237b 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_builder.h +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_builder.h @@ -4,7 +4,7 @@ #include "unique_store_allocator.h" -namespace search::datastore { +namespace vespalib::datastore { class IUniqueStoreDictionary; diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_builder.hpp b/vespalib/src/vespa/vespalib/datastore/unique_store_builder.hpp index 7ea61f4e0ea..0925702ddcb 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_builder.hpp +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_builder.hpp @@ -6,7 +6,7 @@ #include "i_unique_store_dictionary.h" #include "datastore.hpp" -namespace search::datastore { +namespace vespalib::datastore { template <typename Allocator> UniqueStoreBuilder<Allocator>::UniqueStoreBuilder(Allocator& allocator, IUniqueStoreDictionary& dict, uint32_t uniqueValuesHint) diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_comparator.h b/vespalib/src/vespa/vespalib/datastore/unique_store_comparator.h index 4fcef84e3f7..3226c4563cc 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_comparator.h +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_comparator.h @@ -7,7 +7,7 @@ #include "datastore.h" #include <cmath> -namespace search::datastore { +namespace vespalib::datastore { /** * Helper class for comparing elements in unique store. diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.h b/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.h index 69fbc332485..4ec98dc2100 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.h +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.h @@ -5,7 +5,7 @@ #pragma once -namespace search::datastore { +namespace vespalib::datastore { class EntryComparatorWrapper; diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.hpp b/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.hpp index b1189a1b37b..bce11591970 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.hpp +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.hpp @@ -14,7 +14,7 @@ #include <vespa/vespalib/btree/btreenodeallocator.hpp> #include <vespa/vespalib/btree/btreeroot.hpp> -namespace search::datastore { +namespace vespalib::datastore { template <typename DictionaryT, typename ParentT> UniqueStoreDictionary<DictionaryT, ParentT>:: diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_entry.h b/vespalib/src/vespa/vespalib/datastore/unique_store_entry.h index 87c8e860244..78514fe0571 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_entry.h +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_entry.h @@ -6,7 +6,7 @@ #include <cassert> #include <utility> -namespace search::datastore { +namespace vespalib::datastore { template<typename EntryType> struct UniqueStoreEntryReclaimer { diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_entry_base.h b/vespalib/src/vespa/vespalib/datastore/unique_store_entry_base.h index 79ebae9389f..ff695c80cba 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_entry_base.h +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_entry_base.h @@ -7,7 +7,7 @@ #include <cassert> #include <limits> -namespace search::datastore { +namespace vespalib::datastore { /* * Class containing common metadata for entries in unique store. diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.h b/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.h index 5341647815e..db545451a30 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.h +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.h @@ -4,7 +4,7 @@ #include "i_unique_store_dictionary.h" -namespace search::datastore { +namespace vespalib::datastore { class DataStoreBase; diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.hpp b/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.hpp index 48489e9edd5..d779b2f2bd3 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.hpp +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.hpp @@ -6,7 +6,7 @@ #include <vespa/vespalib/datastore/bufferstate.h> #include <vespa/vespalib/datastore/datastorebase.h> -namespace search::datastore { +namespace vespalib::datastore { template <typename RefT> UniqueStoreEnumerator<RefT>::UniqueStoreEnumerator(const IUniqueStoreDictionary &dict, const DataStoreBase &store) diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_remapper.h b/vespalib/src/vespa/vespalib/datastore/unique_store_remapper.h index 13a732e6524..1fa74f59f1a 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_remapper.h +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_remapper.h @@ -5,7 +5,7 @@ #include "entryref.h" #include <vector> -namespace search::datastore { +namespace vespalib::datastore { /** * Remapper for related UniqueStore class, used for adjusting diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_string_allocator.cpp b/vespalib/src/vespa/vespalib/datastore/unique_store_string_allocator.cpp index d7b79c439ef..4f8b1b878f0 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_string_allocator.cpp +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_string_allocator.cpp @@ -2,7 +2,7 @@ #include "unique_store_string_allocator.hpp" -namespace search::datastore { +namespace vespalib::datastore { namespace { diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_string_allocator.h b/vespalib/src/vespa/vespalib/datastore/unique_store_string_allocator.h index f72b9c6119c..7ad4384bece 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_string_allocator.h +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_string_allocator.h @@ -10,7 +10,7 @@ #include <cassert> #include <string> -namespace search::datastore { +namespace vespalib::datastore { namespace string_allocator { diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_string_allocator.hpp b/vespalib/src/vespa/vespalib/datastore/unique_store_string_allocator.hpp index 2b2af70439a..2fe12238342 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_string_allocator.hpp +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_string_allocator.hpp @@ -5,7 +5,7 @@ #include "unique_store_string_allocator.h" #include "datastore.hpp" -namespace search::datastore { +namespace vespalib::datastore { template <typename RefT> UniqueStoreStringAllocator<RefT>::UniqueStoreStringAllocator() diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_string_comparator.h b/vespalib/src/vespa/vespalib/datastore/unique_store_string_comparator.h index 80e7a501cfa..140e38dbef1 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_string_comparator.h +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_string_comparator.h @@ -5,7 +5,7 @@ #include "entry_comparator.h" #include "unique_store_string_allocator.h" -namespace search::datastore { +namespace vespalib::datastore { /** * Compare two strings based on entry refs. diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_value_filter.h b/vespalib/src/vespa/vespalib/datastore/unique_store_value_filter.h index 3694936c550..58409357186 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_value_filter.h +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_value_filter.h @@ -2,7 +2,7 @@ #pragma once -namespace search::datastore { +namespace vespalib::datastore { /* * Helper class for normalizing values inserted into unique store. diff --git a/vespalib/src/vespa/vespalib/test/btree/aggregated_printer.h b/vespalib/src/vespa/vespalib/test/btree/aggregated_printer.h index 18544ef9007..0be569491b1 100644 --- a/vespalib/src/vespa/vespalib/test/btree/aggregated_printer.h +++ b/vespalib/src/vespa/vespalib/test/btree/aggregated_printer.h @@ -5,7 +5,7 @@ #include <vespa/vespalib/btree/noaggregated.h> #include <vespa/vespalib/btree/minmaxaggregated.h> -namespace search::btree::test { +namespace vespalib::btree::test { template <typename ostream, typename Aggregated> void printAggregated(ostream &os, const Aggregated &aggr); @@ -23,4 +23,4 @@ void printAggregated(ostream &os, const MinMaxAggregated &aggr) os << "[min=" << aggr.getMin() << ",max=" << aggr.getMax() << "]"; } -} // namespace search::btree::test +} // namespace vespalib::btree::test diff --git a/vespalib/src/vespa/vespalib/test/btree/btree_printer.h b/vespalib/src/vespa/vespalib/test/btree/btree_printer.h index b5d0e6b5ccb..cd29f373bda 100644 --- a/vespalib/src/vespa/vespalib/test/btree/btree_printer.h +++ b/vespalib/src/vespa/vespalib/test/btree/btree_printer.h @@ -6,7 +6,7 @@ #include "aggregated_printer.h" #include <vespa/vespalib/btree/btreenodeallocator.h> -namespace search::btree::test { +namespace vespalib::btree::test { template <typename ostream, typename NodeAllocator> class BTreePrinter @@ -100,4 +100,4 @@ public: } }; -} // namespace search::btree::test +} // namespace vespalib::btree::test diff --git a/vespalib/src/vespa/vespalib/test/btree/data_printer.h b/vespalib/src/vespa/vespalib/test/btree/data_printer.h index 26b77da0db7..c87b3aad949 100644 --- a/vespalib/src/vespa/vespalib/test/btree/data_printer.h +++ b/vespalib/src/vespa/vespalib/test/btree/data_printer.h @@ -2,7 +2,7 @@ #pragma once -namespace search::btree { +namespace vespalib::btree { class BtreeNoLeafData; @@ -24,5 +24,5 @@ void printData(ostream &os, const BTreeNoLeafData &data) (void) data; } -} // namespace search::btree::test -} // namespace search::btree +} // namespace vespalib::btree::test +} // namespace vespalib::btree diff --git a/vespalib/src/vespa/vespalib/test/datastore/buffer_stats.h b/vespalib/src/vespa/vespalib/test/datastore/buffer_stats.h index bdf49562c33..2484c50b33b 100644 --- a/vespalib/src/vespa/vespalib/test/datastore/buffer_stats.h +++ b/vespalib/src/vespa/vespalib/test/datastore/buffer_stats.h @@ -5,7 +5,7 @@ #include <cassert> #include <cstddef> -namespace search::datastore::test { +namespace vespalib::datastore::test { /* * Class representing expected buffer stats in unit tests. diff --git a/vespalib/src/vespa/vespalib/test/datastore/memstats.h b/vespalib/src/vespa/vespalib/test/datastore/memstats.h index 6f3c8b86482..04e7e6d9090 100644 --- a/vespalib/src/vespa/vespalib/test/datastore/memstats.h +++ b/vespalib/src/vespa/vespalib/test/datastore/memstats.h @@ -5,7 +5,7 @@ #include <vespa/vespalib/util/memoryusage.h> #include <cassert> -namespace search::datastore::test { +namespace vespalib::datastore::test { /* * Class representing expected memory stats in unit tests. |