diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-08-16 13:56:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-16 13:56:13 +0200 |
commit | 50943c28f6dc44520afca08e6a5ce06b48451249 (patch) | |
tree | 5d84e3c23025f19613c7088dd7ecfd05027be2d2 /searchlib | |
parent | d0bd970b0c3557f135b59405adf3008ffb2c6e7d (diff) | |
parent | 894df3c52150bef5665404ff5432d57d59ca2622 (diff) |
Merge pull request #3120 from vespa-engine/balder/produce-summary-features-if-using-dispatch.summaries
Balder/produce summary features if using dispatch.summaries
Diffstat (limited to 'searchlib')
34 files changed, 72 insertions, 145 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp b/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp index ee911c9a8cc..480a9178655 100644 --- a/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp +++ b/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp @@ -11,8 +11,7 @@ #include <vespa/searchlib/common/i_gid_to_lid_mapper.h> #include <vespa/vespalib/data/fileheader.h> -namespace search { -namespace attribute { +namespace search::attribute { namespace { @@ -383,7 +382,7 @@ IMPLEMENT_IDENTIFIABLE_ABSTRACT(ReferenceAttribute, AttributeVector); } -namespace datastore { +namespace search::datastore { using Reference = attribute::Reference; @@ -392,4 +391,3 @@ template class UniqueStoreBuilder<Reference, EntryRefT<22>>; template class UniqueStoreSaver<Reference, EntryRefT<22>>; } -} diff --git a/searchlib/src/vespa/searchlib/attribute/reference_attribute.h b/searchlib/src/vespa/searchlib/attribute/reference_attribute.h index a751213dc9a..08bcfc2cbb8 100644 --- a/searchlib/src/vespa/searchlib/attribute/reference_attribute.h +++ b/searchlib/src/vespa/searchlib/attribute/reference_attribute.h @@ -8,11 +8,9 @@ #include <vespa/searchlib/datastore/unique_store.h> #include <vespa/searchlib/common/rcuvector.h> -namespace search { +namespace search { class IGidToLidMapperFactory; } -class IGidToLidMapperFactory; - -namespace attribute { +namespace search::attribute { /* * Attribute vector which maintains a lid-2-lid mapping from local document ids to global ids (referencing external documents) @@ -87,4 +85,3 @@ public: }; } -} diff --git a/searchlib/src/vespa/searchlib/datastore/allocator.h b/searchlib/src/vespa/searchlib/datastore/allocator.h index 8a1579771d5..8a522266c1a 100644 --- a/searchlib/src/vespa/searchlib/datastore/allocator.h +++ b/searchlib/src/vespa/searchlib/datastore/allocator.h @@ -7,8 +7,7 @@ #include "handle.h" #include <vespa/vespalib/util/arrayref.h> -namespace search { -namespace datastore { +namespace search::datastore { /** * Allocator used to allocate entries of a specific type in an underlying data store. @@ -35,4 +34,3 @@ public: }; } -} diff --git a/searchlib/src/vespa/searchlib/datastore/allocator.hpp b/searchlib/src/vespa/searchlib/datastore/allocator.hpp index b36ae131cc8..9c4f8568924 100644 --- a/searchlib/src/vespa/searchlib/datastore/allocator.hpp +++ b/searchlib/src/vespa/searchlib/datastore/allocator.hpp @@ -5,8 +5,7 @@ #include "allocator.h" #include "bufferstate.h" -namespace search { -namespace datastore { +namespace search::datastore { template <typename EntryT, typename RefT> Allocator<EntryT, RefT>::Allocator(DataStoreBase &store, uint32_t typeId) @@ -70,4 +69,4 @@ Allocator<EntryT, RefT>::allocArray(size_t size) } } -} + diff --git a/searchlib/src/vespa/searchlib/datastore/array_store.h b/searchlib/src/vespa/searchlib/datastore/array_store.h index 5ff4be682ec..c6d3fff1b85 100644 --- a/searchlib/src/vespa/searchlib/datastore/array_store.h +++ b/searchlib/src/vespa/searchlib/datastore/array_store.h @@ -10,8 +10,7 @@ #include "i_compaction_context.h" #include <vespa/vespalib/util/array.h> -namespace search { -namespace datastore { +namespace search::datastore { /** * Datastore for storing arrays of type EntryT that is accessed via a 32-bit EntryRef. @@ -110,4 +109,3 @@ public: }; } -} diff --git a/searchlib/src/vespa/searchlib/datastore/array_store.hpp b/searchlib/src/vespa/searchlib/datastore/array_store.hpp index 33156c61fa5..8478c22903f 100644 --- a/searchlib/src/vespa/searchlib/datastore/array_store.hpp +++ b/searchlib/src/vespa/searchlib/datastore/array_store.hpp @@ -6,8 +6,7 @@ #include "datastore.hpp" #include <atomic> -namespace search { -namespace datastore { +namespace search::datastore { constexpr size_t MIN_BUFFER_CLUSTERS = 8192; @@ -199,4 +198,4 @@ ArrayStore<EntryT, RefT>::optimizedConfigForHugePage(size_t maxSmallArraySize, } } -} + diff --git a/searchlib/src/vespa/searchlib/datastore/array_store_config.h b/searchlib/src/vespa/searchlib/datastore/array_store_config.h index a638541f97e..849ca53f35c 100644 --- a/searchlib/src/vespa/searchlib/datastore/array_store_config.h +++ b/searchlib/src/vespa/searchlib/datastore/array_store_config.h @@ -5,8 +5,7 @@ #include <cstddef> #include <vector> -namespace search { -namespace datastore { +namespace search::datastore { /** * Config specifying layout and buffer allocation strategy for an array store. @@ -66,4 +65,3 @@ public: }; } -} diff --git a/searchlib/src/vespa/searchlib/datastore/buffer_type.cpp b/searchlib/src/vespa/searchlib/datastore/buffer_type.cpp index 6023171abb5..5eca3719002 100644 --- a/searchlib/src/vespa/searchlib/datastore/buffer_type.cpp +++ b/searchlib/src/vespa/searchlib/datastore/buffer_type.cpp @@ -3,8 +3,7 @@ #include "buffer_type.h" #include <algorithm> -namespace search { -namespace datastore { +namespace search::datastore { BufferTypeBase::BufferTypeBase(uint32_t clusterSize, uint32_t minClusters, @@ -123,6 +122,5 @@ BufferTypeBase::calcClustersToAlloc(uint32_t bufferId, size_t sizeNeeded, bool r return wantClusters; } -} // namespace datastore -} // namespace search +} diff --git a/searchlib/src/vespa/searchlib/datastore/buffer_type.h b/searchlib/src/vespa/searchlib/datastore/buffer_type.h index e41e45f54c0..92dcbcc9e8d 100644 --- a/searchlib/src/vespa/searchlib/datastore/buffer_type.h +++ b/searchlib/src/vespa/searchlib/datastore/buffer_type.h @@ -6,8 +6,7 @@ #include <cstdint> #include <sys/types.h> -namespace search { -namespace datastore { +namespace search::datastore { /** * Class used manage allocation and de-allocation of a specific data type in @@ -163,6 +162,4 @@ BufferType<EntryType>::cleanHold(void *buffer, uint64_t offset, uint64_t len, Cl } } -} // namespace search::datastore -} // namespace search - +} diff --git a/searchlib/src/vespa/searchlib/datastore/bufferstate.cpp b/searchlib/src/vespa/searchlib/datastore/bufferstate.cpp index 09c7cf65bb6..cf6c59b69c4 100644 --- a/searchlib/src/vespa/searchlib/datastore/bufferstate.cpp +++ b/searchlib/src/vespa/searchlib/datastore/bufferstate.cpp @@ -5,8 +5,7 @@ using vespalib::alloc::Alloc; -namespace search { -namespace datastore { +namespace search::datastore { BufferState::FreeListList::~FreeListList() { @@ -251,6 +250,5 @@ BufferState::fallbackResize(uint32_t bufferId, std::atomic_thread_fence(std::memory_order_release); } -} // namespace datastore -} // namespace search +} diff --git a/searchlib/src/vespa/searchlib/datastore/bufferstate.h b/searchlib/src/vespa/searchlib/datastore/bufferstate.h index 5ff17d3bc81..904a5bbb16a 100644 --- a/searchlib/src/vespa/searchlib/datastore/bufferstate.h +++ b/searchlib/src/vespa/searchlib/datastore/bufferstate.h @@ -8,8 +8,7 @@ #include <vespa/vespalib/util/alloc.h> #include <vespa/vespalib/util/array.h> -namespace search { -namespace datastore { +namespace search::datastore { /** * Represents a memory allocated buffer (used in a data store) with its state. @@ -182,7 +181,4 @@ public: }; - -} // namespace search::datastore -} // namespace search - +} diff --git a/searchlib/src/vespa/searchlib/datastore/datastore.cpp b/searchlib/src/vespa/searchlib/datastore/datastore.cpp index 2f4e24c5d1a..5def7461e90 100644 --- a/searchlib/src/vespa/searchlib/datastore/datastore.cpp +++ b/searchlib/src/vespa/searchlib/datastore/datastore.cpp @@ -5,13 +5,11 @@ #include <vespa/vespalib/util/array.hpp> #include <vespa/searchlib/common/rcuvector.hpp> -namespace search { -namespace datastore { +namespace search::datastore { template class DataStoreT<EntryRefT<22> >; -} // namespace datastore -} // namespace search +} template void vespalib::Array<search::datastore::DataStoreBase::ElemHold1ListElem>::increase(size_t); template class search::attribute::RcuVector<search::datastore::EntryRef>; diff --git a/searchlib/src/vespa/searchlib/datastore/datastore.h b/searchlib/src/vespa/searchlib/datastore/datastore.h index 0e3518960ed..26826ea0408 100644 --- a/searchlib/src/vespa/searchlib/datastore/datastore.h +++ b/searchlib/src/vespa/searchlib/datastore/datastore.h @@ -7,8 +7,7 @@ #include "free_list_allocator.h" #include "raw_allocator.h" -namespace search { -namespace btree { +namespace search::btree { template<typename EntryType> struct DefaultReclaimer { @@ -17,9 +16,9 @@ struct DefaultReclaimer { } }; -} // namespace btree +} -namespace datastore { +namespace search::datastore { template <typename RefT = EntryRefT<22> > class DataStoreT : public DataStoreBase @@ -108,6 +107,4 @@ public: extern template class DataStoreT<EntryRefT<22> >; -} // namespace search::datastore -} // namespace search - +} diff --git a/searchlib/src/vespa/searchlib/datastore/datastore.hpp b/searchlib/src/vespa/searchlib/datastore/datastore.hpp index f0fc451d952..de9bd1bc161 100644 --- a/searchlib/src/vespa/searchlib/datastore/datastore.hpp +++ b/searchlib/src/vespa/searchlib/datastore/datastore.hpp @@ -8,8 +8,7 @@ #include "raw_allocator.hpp" #include <vespa/vespalib/util/array.hpp> -namespace search { -namespace datastore { +namespace search::datastore { template <typename RefT> DataStoreT<RefT>::DataStoreT() @@ -193,6 +192,5 @@ DataStore<EntryType, RefT>::getEntry(EntryRef ref) const extern template class DataStoreT<EntryRefT<22> >; -} // namespace search::datastore -} // namespace search +} diff --git a/searchlib/src/vespa/searchlib/datastore/datastorebase.cpp b/searchlib/src/vespa/searchlib/datastore/datastorebase.cpp index 5cc1fecf798..d344c79d50e 100644 --- a/searchlib/src/vespa/searchlib/datastore/datastorebase.cpp +++ b/searchlib/src/vespa/searchlib/datastore/datastorebase.cpp @@ -5,8 +5,7 @@ using vespalib::GenerationHeldBase; -namespace search { -namespace datastore { +namespace search::datastore { namespace { @@ -517,5 +516,5 @@ DataStoreBase::startCompactWorstBuffers(bool compactMemory, bool compactAddressS return result; } -} // namespace datastore -} // namespace search +} + diff --git a/searchlib/src/vespa/searchlib/datastore/datastorebase.h b/searchlib/src/vespa/searchlib/datastore/datastorebase.h index 5add42da919..75e1ec8fb85 100644 --- a/searchlib/src/vespa/searchlib/datastore/datastorebase.h +++ b/searchlib/src/vespa/searchlib/datastore/datastorebase.h @@ -9,8 +9,7 @@ #include <vector> #include <deque> -namespace search { -namespace datastore { +namespace search::datastore { class DataStoreBase { @@ -345,6 +344,4 @@ public: }; -} // namespace datastore -} // namespace search - +} diff --git a/searchlib/src/vespa/searchlib/datastore/entryref.h b/searchlib/src/vespa/searchlib/datastore/entryref.h index 865dc3ed287..c8d7ffe8b66 100644 --- a/searchlib/src/vespa/searchlib/datastore/entryref.h +++ b/searchlib/src/vespa/searchlib/datastore/entryref.h @@ -2,10 +2,9 @@ #pragma once -#include <stdint.h> +#include <cstdint> -namespace search { -namespace datastore { +namespace search::datastore { class EntryRef { protected: @@ -59,6 +58,4 @@ public: static uint64_t pad(uint64_t val) { return (-val & PadConstant); } }; -} // namespace search::datastore -} // namespace search - +} diff --git a/searchlib/src/vespa/searchlib/datastore/free_list_allocator.h b/searchlib/src/vespa/searchlib/datastore/free_list_allocator.h index 92dd02f9103..a23cb71b90c 100644 --- a/searchlib/src/vespa/searchlib/datastore/free_list_allocator.h +++ b/searchlib/src/vespa/searchlib/datastore/free_list_allocator.h @@ -4,8 +4,7 @@ #include "allocator.h" -namespace search { -namespace datastore { +namespace search::datastore { /** * Allocator used to allocate entries of a specific type in an underlying data store @@ -34,4 +33,3 @@ public: }; } -} diff --git a/searchlib/src/vespa/searchlib/datastore/free_list_allocator.hpp b/searchlib/src/vespa/searchlib/datastore/free_list_allocator.hpp index 6ed1c324b06..5db3e49119f 100644 --- a/searchlib/src/vespa/searchlib/datastore/free_list_allocator.hpp +++ b/searchlib/src/vespa/searchlib/datastore/free_list_allocator.hpp @@ -5,8 +5,7 @@ #include "free_list_allocator.h" #include "bufferstate.h" -namespace search { -namespace datastore { +namespace search::datastore { template <typename EntryT, typename RefT, typename ReclaimerT> FreeListAllocator<EntryT, RefT, ReclaimerT>::FreeListAllocator(DataStoreBase &store, uint32_t typeId) @@ -102,4 +101,4 @@ FreeListAllocator<EntryT, RefT, ReclaimerT>::allocArray(size_t size) } } -} + diff --git a/searchlib/src/vespa/searchlib/datastore/handle.h b/searchlib/src/vespa/searchlib/datastore/handle.h index b6119f4446d..c0dce8d3d75 100644 --- a/searchlib/src/vespa/searchlib/datastore/handle.h +++ b/searchlib/src/vespa/searchlib/datastore/handle.h @@ -4,8 +4,7 @@ #include "entryref.h" -namespace search { -namespace datastore { +namespace search::datastore { /** * Handle to data allocated in a data store and a EntryRef used for read-only access to data later. @@ -20,4 +19,3 @@ struct Handle }; } -} diff --git a/searchlib/src/vespa/searchlib/datastore/i_compaction_context.h b/searchlib/src/vespa/searchlib/datastore/i_compaction_context.h index afa7d0dff47..aa537968f1c 100644 --- a/searchlib/src/vespa/searchlib/datastore/i_compaction_context.h +++ b/searchlib/src/vespa/searchlib/datastore/i_compaction_context.h @@ -4,8 +4,7 @@ #include <vespa/vespalib/util/array.h> -namespace search { -namespace datastore { +namespace search::datastore { /** * A compaction context is used when performing a compaction of data buffers in a data store. @@ -20,4 +19,3 @@ struct ICompactionContext { }; } -} diff --git a/searchlib/src/vespa/searchlib/datastore/raw_allocator.h b/searchlib/src/vespa/searchlib/datastore/raw_allocator.h index 31c2d959648..d0b7d1d1ca2 100644 --- a/searchlib/src/vespa/searchlib/datastore/raw_allocator.h +++ b/searchlib/src/vespa/searchlib/datastore/raw_allocator.h @@ -6,8 +6,7 @@ #include "entryref.h" #include "handle.h" -namespace search { -namespace datastore { +namespace search::datastore { /** * Allocator used to allocate raw buffers (EntryT *) in an underlying data store @@ -33,4 +32,3 @@ public: }; } -} diff --git a/searchlib/src/vespa/searchlib/datastore/raw_allocator.hpp b/searchlib/src/vespa/searchlib/datastore/raw_allocator.hpp index 4e43a212fbd..1c72d793ec6 100644 --- a/searchlib/src/vespa/searchlib/datastore/raw_allocator.hpp +++ b/searchlib/src/vespa/searchlib/datastore/raw_allocator.hpp @@ -5,8 +5,7 @@ #include "raw_allocator.h" #include "bufferstate.h" -namespace search { -namespace datastore { +namespace search::datastore { template <typename EntryT, typename RefT> RawAllocator<EntryT, RefT>::RawAllocator(DataStoreBase &store, uint32_t typeId) @@ -30,4 +29,4 @@ RawAllocator<EntryT, RefT>::alloc(size_t numElems, size_t extraElems) } } -} + diff --git a/searchlib/src/vespa/searchlib/datastore/unique_store.h b/searchlib/src/vespa/searchlib/datastore/unique_store.h index cd5f9c9e489..15dc485b1da 100644 --- a/searchlib/src/vespa/searchlib/datastore/unique_store.h +++ b/searchlib/src/vespa/searchlib/datastore/unique_store.h @@ -10,8 +10,7 @@ #include <vespa/vespalib/util/array.h> #include <vespa/searchlib/btree/btree.h> -namespace search { -namespace datastore { +namespace search::datastore { template <typename EntryT, typename RefT> class UniqueStoreBuilder; @@ -117,4 +116,3 @@ public: }; } -} diff --git a/searchlib/src/vespa/searchlib/datastore/unique_store.hpp b/searchlib/src/vespa/searchlib/datastore/unique_store.hpp index 37835f1ea3f..603b6e53a85 100644 --- a/searchlib/src/vespa/searchlib/datastore/unique_store.hpp +++ b/searchlib/src/vespa/searchlib/datastore/unique_store.hpp @@ -15,8 +15,7 @@ #include "unique_store_saver.hpp" #include <atomic> -namespace search { -namespace datastore { +namespace search::datastore { constexpr size_t NUMCLUSTERS_FOR_NEW_UNIQUESTORE_BUFFER = 1024u; @@ -252,4 +251,3 @@ UniqueStore<EntryT, RefT>::getNumUniques() const } } -} diff --git a/searchlib/src/vespa/searchlib/datastore/unique_store_builder.h b/searchlib/src/vespa/searchlib/datastore/unique_store_builder.h index f6bac2eb869..0a3ec447e67 100644 --- a/searchlib/src/vespa/searchlib/datastore/unique_store_builder.h +++ b/searchlib/src/vespa/searchlib/datastore/unique_store_builder.h @@ -4,8 +4,7 @@ #include "unique_store.h" -namespace search { -namespace datastore { +namespace search::datastore { /** * Builder for related UniqueStore class. @@ -45,4 +44,3 @@ public: }; } -} diff --git a/searchlib/src/vespa/searchlib/datastore/unique_store_builder.hpp b/searchlib/src/vespa/searchlib/datastore/unique_store_builder.hpp index 5182942f301..9445eb3a9f2 100644 --- a/searchlib/src/vespa/searchlib/datastore/unique_store_builder.hpp +++ b/searchlib/src/vespa/searchlib/datastore/unique_store_builder.hpp @@ -11,8 +11,7 @@ #include <vespa/searchlib/btree/btreeiterator.hpp> #include <vespa/searchlib/btree/btreenode.hpp> -namespace search { -namespace datastore { +namespace search::datastore { template <typename EntryT, typename RefT> UniqueStoreBuilder<EntryT, RefT>::UniqueStoreBuilder(DataStoreType &store, uint32_t typeId, Dictionary &dict, uint32_t uniqueValuesHint) @@ -57,4 +56,4 @@ UniqueStoreBuilder<EntryT, RefT>::makeDictionary() } } -} + diff --git a/searchlib/src/vespa/searchlib/datastore/unique_store_saver.h b/searchlib/src/vespa/searchlib/datastore/unique_store_saver.h index 74719fe83fa..6fdcf2da83a 100644 --- a/searchlib/src/vespa/searchlib/datastore/unique_store_saver.h +++ b/searchlib/src/vespa/searchlib/datastore/unique_store_saver.h @@ -4,8 +4,7 @@ #include "unique_store.h" -namespace search { -namespace datastore { +namespace search::datastore { /** * Saver for related UniqueStore class. @@ -50,4 +49,3 @@ public: }; } -} diff --git a/searchlib/src/vespa/searchlib/datastore/unique_store_saver.hpp b/searchlib/src/vespa/searchlib/datastore/unique_store_saver.hpp index 0b54d454c14..3377b674930 100644 --- a/searchlib/src/vespa/searchlib/datastore/unique_store_saver.hpp +++ b/searchlib/src/vespa/searchlib/datastore/unique_store_saver.hpp @@ -4,8 +4,7 @@ #include "unique_store_saver.h" -namespace search { -namespace datastore { +namespace search::datastore { template <typename EntryT, typename RefT> UniqueStoreSaver<EntryT, RefT>::UniqueStoreSaver(const Dictionary &dict, const DataStoreBase &store) @@ -46,4 +45,3 @@ UniqueStoreSaver<EntryT, RefT>::enumerateValues() } } -} diff --git a/searchlib/src/vespa/searchlib/engine/docsumapi.cpp b/searchlib/src/vespa/searchlib/engine/docsumapi.cpp index 6e5c9b20af7..8ba59164831 100644 --- a/searchlib/src/vespa/searchlib/engine/docsumapi.cpp +++ b/searchlib/src/vespa/searchlib/engine/docsumapi.cpp @@ -2,8 +2,7 @@ #include "docsumapi.h" #include <cassert> -namespace search { -namespace engine { +namespace search::engine { DocsumReply::UP DocsumServer::getDocsums(DocsumRequest::UP request) @@ -14,4 +13,3 @@ DocsumServer::getDocsums(DocsumRequest::UP request) } } -} diff --git a/searchlib/src/vespa/searchlib/engine/docsumapi.h b/searchlib/src/vespa/searchlib/engine/docsumapi.h index 0d944d533b2..dc51a7319a9 100644 --- a/searchlib/src/vespa/searchlib/engine/docsumapi.h +++ b/searchlib/src/vespa/searchlib/engine/docsumapi.h @@ -5,8 +5,7 @@ #include "docsumrequest.h" #include "docsumreply.h" -namespace search { -namespace engine { +namespace search::engine { /** * A docsum client is the object being notified of the completion of @@ -69,6 +68,4 @@ public: virtual ~DocsumServer() {} }; -} // namespace engine -} // namespace search - +} diff --git a/searchlib/src/vespa/searchlib/engine/docsumrequest.h b/searchlib/src/vespa/searchlib/engine/docsumrequest.h index 1ac497961be..a0955aaa473 100644 --- a/searchlib/src/vespa/searchlib/engine/docsumrequest.h +++ b/searchlib/src/vespa/searchlib/engine/docsumrequest.h @@ -8,9 +8,9 @@ #include "request.h" #include "source_description.h" -namespace search { -namespace fs4transport { class FS4Packet_GETDOCSUMSX; } -namespace engine { +namespace search::fs4transport { class FS4Packet_GETDOCSUMSX; } + +namespace search::engine { class DocsumRequest : public Request { @@ -91,6 +91,4 @@ public: bool useRootSlime() const { return _useRootSlime; } }; -} // namespace engine -} // namespace search - +} diff --git a/searchlib/src/vespa/searchlib/engine/propertiesmap.h b/searchlib/src/vespa/searchlib/engine/propertiesmap.h index f96790abbd9..d4d4598add2 100644 --- a/searchlib/src/vespa/searchlib/engine/propertiesmap.h +++ b/searchlib/src/vespa/searchlib/engine/propertiesmap.h @@ -5,8 +5,7 @@ #include <vespa/searchlib/fef/properties.h> #include <vespa/searchlib/common/mapnames.h> -namespace search { -namespace engine { +namespace search::engine { /** * A simple wrapper class used to hold multiple named collections of @@ -15,8 +14,8 @@ namespace engine { class PropertiesMap { private: - typedef search::fef::Properties Props; - typedef vespalib::hash_map<vespalib::string, Props> PropsMap; + using Props = search::fef::Properties; + using PropsMap = vespalib::hash_map<vespalib::string, Props>; static Props _emptyProperties; PropsMap _propertiesMap; @@ -29,7 +28,7 @@ private: * @param name name of properties * @return the properties **/ - const search::fef::Properties &lookup(const vespalib::stringref &name) const; + const Props &lookup(const vespalib::stringref &name) const; public: typedef PropsMap::const_iterator ITR; @@ -44,7 +43,7 @@ public: * @param name name of properties * @return the properties **/ - search::fef::Properties &lookupCreate(const vespalib::stringref &name); + Props &lookupCreate(const vespalib::stringref &name); /** * Obtain the number of named collection of properties held by @@ -73,7 +72,7 @@ public: * * @return rank properties **/ - const search::fef::Properties &rankProperties() const { + const Props &rankProperties() const { return lookup(MapNames::RANK); } @@ -83,7 +82,7 @@ public: * * @return feature overrides **/ - const search::fef::Properties &featureOverrides() const { + const Props &featureOverrides() const { return lookup(MapNames::FEATURE); } @@ -93,7 +92,7 @@ public: * * @return highlight terms properties **/ - const search::fef::Properties &highlightTerms() const { + const Props &highlightTerms() const { return lookup(MapNames::HIGHLIGHTTERMS); } @@ -102,7 +101,7 @@ public: * * @return match properties **/ - const search::fef::Properties &matchProperties() const { + const Props &matchProperties() const { return lookup(MapNames::MATCH); } @@ -111,7 +110,7 @@ public: * * @return cache properties **/ - const search::fef::Properties &cacheProperties() const { + const Props &cacheProperties() const { return lookup(MapNames::CACHES); } @@ -120,12 +119,10 @@ public: * * @return model properties **/ - const search::fef::Properties &modelOverrides() const { + const Props &modelOverrides() const { return lookup(MapNames::MODEL); } }; -} // namespace engine -} // namespace search - +} diff --git a/searchlib/src/vespa/searchlib/engine/request.h b/searchlib/src/vespa/searchlib/engine/request.h index f4eeea226a6..4a2016f2a4b 100644 --- a/searchlib/src/vespa/searchlib/engine/request.h +++ b/searchlib/src/vespa/searchlib/engine/request.h @@ -2,12 +2,10 @@ #pragma once -#include <vespa/fastos/timestamp.h> -#include <vespa/vespalib/stllike/string.h> #include "propertiesmap.h" +#include <vespa/fastos/timestamp.h> -namespace search { -namespace engine { +namespace search::engine { class Request { @@ -39,6 +37,4 @@ public: std::vector<char> stackDump; }; -} // namespace engine -} // namespace search - +} |