diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-02-27 08:28:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-27 08:28:36 +0100 |
commit | 5fdd5827081972ab561a10e4888f392f7c6a8570 (patch) | |
tree | 181afc9bd8593c74566778383a38c82d084f726a /searchlib | |
parent | 41e627de145f262fa3bd2752f5f7b4f33d5bc8e9 (diff) | |
parent | 8b6038f60ffb5708c7c91dbc671bbf26afe35ad8 (diff) |
Merge pull request #21432 from vespa-engine/toregge/remove-inlining-warnings-in-searchlib
Remove inlining warnings (searchlib).
Diffstat (limited to 'searchlib')
48 files changed, 294 insertions, 11 deletions
diff --git a/searchlib/src/tests/attribute/imported_attribute_vector/imported_attribute_vector_test.cpp b/searchlib/src/tests/attribute/imported_attribute_vector/imported_attribute_vector_test.cpp index fa567be9b76..167eaccc2f7 100644 --- a/searchlib/src/tests/attribute/imported_attribute_vector/imported_attribute_vector_test.cpp +++ b/searchlib/src/tests/attribute/imported_attribute_vector/imported_attribute_vector_test.cpp @@ -244,6 +244,7 @@ struct SingleStringAttrFixture : Fixture { SingleStringAttrFixture() : Fixture() { setup(); } + ~SingleStringAttrFixture() override; void setup() { this->template reset_with_single_value_reference_mappings<StringAttribute, const char*>( @@ -253,6 +254,8 @@ struct SingleStringAttrFixture : Fixture { } }; +SingleStringAttrFixture::~SingleStringAttrFixture() = default; + TEST_F("Single-valued string attribute values can be retrieved via reference", SingleStringAttrFixture) { char buf[64]; @@ -329,6 +332,7 @@ struct MultiStringAttrFixture : Fixture { MultiStringAttrFixture() : Fixture() { setup(); } + ~MultiStringAttrFixture() override; void setup() { reset_with_array_value_reference_mappings<StringAttribute, const char *>( @@ -338,6 +342,8 @@ struct MultiStringAttrFixture : Fixture { } }; +MultiStringAttrFixture::~MultiStringAttrFixture() = default; + TEST_F("Multi-valued string attribute values can be retrieved via reference", MultiStringAttrFixture) { assert_multi_value_matches<const char*>(f, DocId(2), f.doc3_values, string_eq); assert_multi_value_matches<const char*>(f, DocId(4), f.doc7_values, string_eq); @@ -368,6 +374,7 @@ struct WeightedMultiStringAttrFixture : Fixture { WeightedMultiStringAttrFixture() : Fixture() { setup(); } + ~WeightedMultiStringAttrFixture() override; void setup() { reset_with_wset_value_reference_mappings<StringAttribute, WeightedString>( @@ -377,6 +384,8 @@ struct WeightedMultiStringAttrFixture : Fixture { } }; +WeightedMultiStringAttrFixture::~WeightedMultiStringAttrFixture() = default; + TEST_F("Weighted string attribute values can be retrieved via reference", WeightedMultiStringAttrFixture) { assert_multi_value_matches<WeightedString>(f, DocId(1), f.doc3_values); assert_multi_value_matches<WeightedString>(f, DocId(3), f.doc7_values); @@ -523,6 +532,7 @@ struct TensorAttrFixture : Fixture { { setup(dense); } + ~TensorAttrFixture() override; void setup(bool dense) { if (dense) { tensor1 = createTensor(TensorSpec("tensor(x[2])").add({{"x", 1}}, 11)); @@ -562,6 +572,7 @@ struct TensorAttrFixture : Fixture { } }; +TensorAttrFixture::~TensorAttrFixture() = default; TEST_F("Imported sparse tensor", TensorAttrFixture(false)) { diff --git a/searchlib/src/tests/attribute/imported_search_context/imported_search_context_test.cpp b/searchlib/src/tests/attribute/imported_search_context/imported_search_context_test.cpp index 35011c052d2..6cb0dec3c1f 100644 --- a/searchlib/src/tests/attribute/imported_search_context/imported_search_context_test.cpp +++ b/searchlib/src/tests/attribute/imported_search_context/imported_search_context_test.cpp @@ -21,6 +21,7 @@ struct Fixture : ImportedAttributeFixture { Fixture(bool useSearchCache = false, FastSearchConfig fastSearch = FastSearchConfig::Default) : ImportedAttributeFixture(useSearchCache, fastSearch) {} + ~Fixture() override; std::unique_ptr<ImportedSearchContext> create_context(std::unique_ptr<QueryTermSimple> term) { @@ -50,6 +51,8 @@ struct Fixture : ImportedAttributeFixture { } }; +Fixture::~Fixture() = default; + template <typename Iterator> bool is_hit_with_weight(Iterator& iter, TermFieldMatchData& match, DocId lid, int32_t weight) { if (!EXPECT_TRUE(iter.seek(lid))) { @@ -155,8 +158,11 @@ struct ArrayValueFixture : Fixture { {DocId(4), dummy_gid(7), DocId(7), doc7_values}, {DocId(5), dummy_gid(8), DocId(8), doc8_values}}); } + ~ArrayValueFixture() override; }; +ArrayValueFixture::~ArrayValueFixture() = default; + TEST_F("Non-strict iterator handles unmapped LIDs", ArrayValueFixture) { auto ctx = f.create_context(word_term("1234")); TermFieldMatchData match; @@ -196,8 +202,11 @@ struct WsetValueFixture : Fixture { {DocId(4), dummy_gid(4), DocId(4), doc4_values}, {DocId(6), dummy_gid(7), DocId(7), doc7_values}}); } + ~WsetValueFixture() override; }; +WsetValueFixture::~WsetValueFixture() = default; + TEST_F("Non-strict iterator unpacks target match data for weighted set hit", WsetValueFixture) { auto ctx = f.create_context(word_term("foo")); TermFieldMatchData match; @@ -243,8 +252,11 @@ struct SingleValueFixture : Fixture { {DocId(5), dummy_gid(8), DocId(8), 5678}, {DocId(7), dummy_gid(9), DocId(9), 4321}}); } + ~SingleValueFixture() override; }; +SingleValueFixture::~SingleValueFixture() = default; + // Strict iteration implicitly tests unmapped LIDs by its nature, so we don't have a separate test for that. TEST_F("Strict iterator seeks to first available hit LID", SingleValueFixture) { @@ -390,8 +402,11 @@ struct SearchCacheFixture : Fixture { FastSearchConfig::ExplicitlyEnabled, FilterConfig::ExplicitlyEnabled); } + ~SearchCacheFixture() override; }; +SearchCacheFixture::~SearchCacheFixture() = default; + BitVectorSearchCache::Entry::SP makeSearchCacheEntry(const std::vector<uint32_t> docIds, uint32_t docIdLimit) { diff --git a/searchlib/src/tests/docstore/document_store/document_store_test.cpp b/searchlib/src/tests/docstore/document_store/document_store_test.cpp index f2bec30a349..0483ea26423 100644 --- a/searchlib/src/tests/docstore/document_store/document_store_test.cpp +++ b/searchlib/src/tests/docstore/document_store/document_store_test.cpp @@ -13,6 +13,7 @@ document::DocumentTypeRepo repo; struct NullDataStore : IDataStore { NullDataStore() : IDataStore("") {} + ~NullDataStore() override; ssize_t read(uint32_t, vespalib::DataBuffer &) const override { return 0; } void read(const LidVector &, IBufferVisitor &) const override { } void write(uint64_t, uint32_t, const void *, size_t) override {} @@ -46,6 +47,8 @@ struct NullDataStore : IDataStore { void shrinkLidSpace() override {} }; +NullDataStore::~NullDataStore() = default; + TEST_FFF("require that uncache docstore lookups are counted", DocumentStore::Config(CompressionConfig::NONE, 0, 0), NullDataStore(), DocumentStore(f1, f2)) diff --git a/searchlib/src/tests/features/element_similarity_feature/element_similarity_feature_test.cpp b/searchlib/src/tests/features/element_similarity_feature/element_similarity_feature_test.cpp index dd1dc5b3689..97508e1f582 100644 --- a/searchlib/src/tests/features/element_similarity_feature/element_similarity_feature_test.cpp +++ b/searchlib/src/tests/features/element_similarity_feature/element_similarity_feature_test.cpp @@ -65,11 +65,14 @@ struct IndexFixture { struct FeatureDumpFixture : public IDumpFeatureVisitor { std::vector<vespalib::string> actual; FeatureDumpFixture() : IDumpFeatureVisitor(), actual() {} + ~FeatureDumpFixture() override; virtual void visitDumpFeature(const vespalib::string &name) override { actual.push_back(name); } }; +FeatureDumpFixture::~FeatureDumpFixture() = default; + struct RankFixture : BlueprintFactoryFixture { RankFixture() : BlueprintFactoryFixture() {} double get_feature(const vespalib::string &query, const FtIndex &index, const vespalib::string &select, diff --git a/searchlib/src/tests/features/imported_dot_product/imported_dot_product_test.cpp b/searchlib/src/tests/features/imported_dot_product/imported_dot_product_test.cpp index 72613cd0fd4..a32d52d06a0 100644 --- a/searchlib/src/tests/features/imported_dot_product/imported_dot_product_test.cpp +++ b/searchlib/src/tests/features/imported_dot_product/imported_dot_product_test.cpp @@ -94,6 +94,7 @@ struct FixtureBase : ImportedAttributeFixture { struct ArrayFixture : FixtureBase { + ~ArrayFixture() override; void setup_integer_mappings(BasicType int_type) override { reset_with_array_value_reference_mappings<IntegerAttribute, int64_t>( int_type, @@ -168,6 +169,8 @@ struct ArrayFixture : FixtureBase { } }; +ArrayFixture::~ArrayFixture() = default; + TEST_F("Dense i32/i64 array dot products can be evaluated with string parameter", ArrayFixture) { f.check_all_integer_executions(2*2 + 3*3 + 5*4, "[2 3 4]", DocId(1)); } @@ -261,8 +264,11 @@ struct WsetFixture : FixtureBase { int_type, {{DocId(3), dummy_gid(7), DocId(7), doc7_values}}); } + ~WsetFixture() override; }; +WsetFixture::~WsetFixture() = default; + TEST_F("i32/i64 wset dot products can be evaluated with string parameter", WsetFixture) { f.check_all_integer_executions(21*7 + 19*13, "{200:21,300:19,999:1234}", DocId(3)); } diff --git a/searchlib/src/tests/features/item_raw_score/item_raw_score_test.cpp b/searchlib/src/tests/features/item_raw_score/item_raw_score_test.cpp index 67924d2019a..ab6fa1c0596 100644 --- a/searchlib/src/tests/features/item_raw_score/item_raw_score_test.cpp +++ b/searchlib/src/tests/features/item_raw_score/item_raw_score_test.cpp @@ -43,8 +43,11 @@ struct FeatureDumpFixture : public IDumpFeatureVisitor { TEST_ERROR("no features should be dumped"); } FeatureDumpFixture() : IDumpFeatureVisitor() {} + ~FeatureDumpFixture() override; }; +FeatureDumpFixture::~FeatureDumpFixture() = default; + struct RankFixture : BlueprintFactoryFixture, IndexFixture { QueryEnvironment queryEnv; RankSetup rankSetup; diff --git a/searchlib/src/tests/features/native_dot_product/native_dot_product_test.cpp b/searchlib/src/tests/features/native_dot_product/native_dot_product_test.cpp index 4d9318311f3..e4743a4a783 100644 --- a/searchlib/src/tests/features/native_dot_product/native_dot_product_test.cpp +++ b/searchlib/src/tests/features/native_dot_product/native_dot_product_test.cpp @@ -42,8 +42,11 @@ struct FeatureDumpFixture : public IDumpFeatureVisitor { TEST_ERROR("no features should be dumped"); } FeatureDumpFixture() : IDumpFeatureVisitor() {} + ~FeatureDumpFixture() override; }; +FeatureDumpFixture::~FeatureDumpFixture() = default; + std::vector<uint32_t> vec() { std::vector<uint32_t> ret; return ret; diff --git a/searchlib/src/tests/features/nns_closeness/nns_closeness_test.cpp b/searchlib/src/tests/features/nns_closeness/nns_closeness_test.cpp index 713abeada6a..c7667b2cecd 100644 --- a/searchlib/src/tests/features/nns_closeness/nns_closeness_test.cpp +++ b/searchlib/src/tests/features/nns_closeness/nns_closeness_test.cpp @@ -45,8 +45,11 @@ struct FeatureDumpFixture : public IDumpFeatureVisitor { TEST_ERROR("no features should be dumped"); } FeatureDumpFixture() : IDumpFeatureVisitor() {} + ~FeatureDumpFixture() override; }; +FeatureDumpFixture::~FeatureDumpFixture() = default; + struct RankFixture : BlueprintFactoryFixture, IndexFixture { QueryEnvironment queryEnv; RankSetup rankSetup; diff --git a/searchlib/src/tests/features/nns_distance/nns_distance_test.cpp b/searchlib/src/tests/features/nns_distance/nns_distance_test.cpp index c3973a6493c..1e81b5576c1 100644 --- a/searchlib/src/tests/features/nns_distance/nns_distance_test.cpp +++ b/searchlib/src/tests/features/nns_distance/nns_distance_test.cpp @@ -45,8 +45,11 @@ struct FeatureDumpFixture : public IDumpFeatureVisitor { TEST_ERROR("no features should be dumped"); } FeatureDumpFixture() : IDumpFeatureVisitor() {} + ~FeatureDumpFixture() override; }; +FeatureDumpFixture::~FeatureDumpFixture() = default; + struct RankFixture : BlueprintFactoryFixture, IndexFixture { QueryEnvironment queryEnv; RankSetup rankSetup; diff --git a/searchlib/src/tests/features/raw_score/raw_score_test.cpp b/searchlib/src/tests/features/raw_score/raw_score_test.cpp index b3ad2f3c803..1fb3f4050a1 100644 --- a/searchlib/src/tests/features/raw_score/raw_score_test.cpp +++ b/searchlib/src/tests/features/raw_score/raw_score_test.cpp @@ -40,8 +40,11 @@ struct FeatureDumpFixture : public IDumpFeatureVisitor { TEST_ERROR("no features should be dumped"); } FeatureDumpFixture() : IDumpFeatureVisitor() {} + ~FeatureDumpFixture() override; }; +FeatureDumpFixture::~FeatureDumpFixture() = default; + struct RankFixture : BlueprintFactoryFixture, IndexFixture { QueryEnvironment queryEnv; RankSetup rankSetup; diff --git a/searchlib/src/tests/features/subqueries/subqueries_test.cpp b/searchlib/src/tests/features/subqueries/subqueries_test.cpp index be7f6bb5e9a..cc6febead3c 100644 --- a/searchlib/src/tests/features/subqueries/subqueries_test.cpp +++ b/searchlib/src/tests/features/subqueries/subqueries_test.cpp @@ -38,8 +38,11 @@ struct FeatureDumpFixture : public IDumpFeatureVisitor { TEST_ERROR("no features should be dumped"); } FeatureDumpFixture() : IDumpFeatureVisitor() {} + ~FeatureDumpFixture() override; }; +FeatureDumpFixture::~FeatureDumpFixture() = default; + struct RankFixture : BlueprintFactoryFixture, IndexFixture { QueryEnvironment queryEnv; RankSetup rankSetup; diff --git a/searchlib/src/tests/hitcollector/hitcollector_test.cpp b/searchlib/src/tests/hitcollector/hitcollector_test.cpp index ed68c47ea23..3a7bce17288 100644 --- a/searchlib/src/tests/hitcollector/hitcollector_test.cpp +++ b/searchlib/src/tests/hitcollector/hitcollector_test.cpp @@ -179,18 +179,24 @@ struct Fixture { struct AscendingScoreFixture : Fixture { AscendingScoreFixture() : Fixture() {} + ~AscendingScoreFixture() override; HitRank calculateScore(uint32_t i) override { return i + 100; } }; +AscendingScoreFixture::~AscendingScoreFixture() = default; + struct DescendingScoreFixture : Fixture { DescendingScoreFixture() : Fixture() {} + ~DescendingScoreFixture() override; HitRank calculateScore(uint32_t i) override { return 100 - i; } }; +DescendingScoreFixture::~DescendingScoreFixture() = default; + TEST_F("testReRank - empty", Fixture) { EXPECT_EQUAL(0u, f.reRank()); } diff --git a/searchlib/src/tests/queryeval/weak_and/wand_bench_setup.hpp b/searchlib/src/tests/queryeval/weak_and/wand_bench_setup.hpp index 14de5ec6475..87eec226221 100644 --- a/searchlib/src/tests/queryeval/weak_and/wand_bench_setup.hpp +++ b/searchlib/src/tests/queryeval/weak_and/wand_bench_setup.hpp @@ -97,34 +97,44 @@ struct WandFactory { struct VespaWandFactory : WandFactory { uint32_t n; VespaWandFactory(uint32_t n_in) : n(n_in) {} + ~VespaWandFactory() override; virtual std::string name() const override { return make_string("VESPA WAND (n=%u)", n); } virtual SearchIterator::UP create(const wand::Terms &terms) override { return SearchIterator::UP(WeakAndSearch::create(terms, n, true)); } }; +VespaWandFactory::~VespaWandFactory() = default; + struct VespaArrayWandFactory : WandFactory { uint32_t n; VespaArrayWandFactory(uint32_t n_in) : n(n_in) {} + ~VespaArrayWandFactory() override; virtual std::string name() const override { return make_string("VESPA ARRAY WAND (n=%u)", n); } virtual SearchIterator::UP create(const wand::Terms &terms) override { return SearchIterator::UP(WeakAndSearch::createArrayWand(terms, n, true)); } }; +VespaArrayWandFactory::~VespaArrayWandFactory() = default; + struct VespaHeapWandFactory : WandFactory { uint32_t n; VespaHeapWandFactory(uint32_t n_in) : n(n_in) {} + ~VespaHeapWandFactory() override; virtual std::string name() const override { return make_string("VESPA HEAP WAND (n=%u)", n); } virtual SearchIterator::UP create(const wand::Terms &terms) override { return SearchIterator::UP(WeakAndSearch::createHeapWand(terms, n, true)); } }; +VespaHeapWandFactory::~VespaHeapWandFactory() = default; + struct VespaParallelWandFactory : public WandFactory { SharedWeakAndPriorityQueue scores; TermFieldMatchData rootMatchData; VespaParallelWandFactory(uint32_t n) : scores(n), rootMatchData() {} + ~VespaParallelWandFactory() override; virtual std::string name() const override { return make_string("VESPA PWAND (n=%u)", scores.getScoresToTrack()); } virtual SearchIterator::UP create(const wand::Terms &terms) override { return SearchIterator::UP(ParallelWeakAndSearch::create(terms, @@ -133,8 +143,11 @@ struct VespaParallelWandFactory : public WandFactory { } }; +VespaParallelWandFactory::~VespaParallelWandFactory() = default; + struct VespaParallelArrayWandFactory : public VespaParallelWandFactory { VespaParallelArrayWandFactory(uint32_t n) : VespaParallelWandFactory(n) {} + ~VespaParallelArrayWandFactory() override; virtual std::string name() const override { return make_string("VESPA ARRAY PWAND (n=%u)", scores.getScoresToTrack()); } virtual SearchIterator::UP create(const wand::Terms &terms) override { return SearchIterator::UP(ParallelWeakAndSearch::createArrayWand(terms, @@ -143,8 +156,11 @@ struct VespaParallelArrayWandFactory : public VespaParallelWandFactory { } }; +VespaParallelArrayWandFactory::~VespaParallelArrayWandFactory() = default; + struct VespaParallelHeapWandFactory : public VespaParallelWandFactory { VespaParallelHeapWandFactory(uint32_t n) : VespaParallelWandFactory(n) {} + ~VespaParallelHeapWandFactory() override; virtual std::string name() const override { return make_string("VESPA HEAP PWAND (n=%u)", scores.getScoresToTrack()); } virtual SearchIterator::UP create(const wand::Terms &terms) override { return SearchIterator::UP(ParallelWeakAndSearch::createHeapWand(terms, @@ -153,29 +169,38 @@ struct VespaParallelHeapWandFactory : public VespaParallelWandFactory { } }; +VespaParallelHeapWandFactory::~VespaParallelHeapWandFactory() = default; + struct TermFrequencyRiseWandFactory : WandFactory { uint32_t n; TermFrequencyRiseWandFactory(uint32_t n_in) : n(n_in) {} + ~TermFrequencyRiseWandFactory() override; virtual std::string name() const override { return make_string("RISE WAND TF (n=%u)", n); } virtual SearchIterator::UP create(const wand::Terms &terms) override { return SearchIterator::UP(new rise::TermFrequencyRiseWand(terms, n)); } }; +TermFrequencyRiseWandFactory::~TermFrequencyRiseWandFactory() = default; + struct DotProductRiseWandFactory : WandFactory { uint32_t n; DotProductRiseWandFactory(uint32_t n_in) : n(n_in) {} + ~DotProductRiseWandFactory() override; virtual std::string name() const override { return make_string("RISE WAND DP (n=%u)", n); } virtual SearchIterator::UP create(const wand::Terms &terms) override { return SearchIterator::UP(new rise::DotProductRiseWand(terms, n)); } }; +DotProductRiseWandFactory::~DotProductRiseWandFactory() = default; + struct FilterFactory : WandFactory { WandFactory &factory; Stats stats; uint32_t n; FilterFactory(WandFactory &f, uint32_t n_in) : factory(f), n(n_in) {} + ~FilterFactory() override; virtual std::string name() const override { return make_string("Filter (mod=%u) [%s]", n, factory.name().c_str()); } virtual SearchIterator::UP create(const wand::Terms &terms) override { AndNotSearch::Children children; @@ -185,6 +210,8 @@ struct FilterFactory : WandFactory { } }; +FilterFactory::~FilterFactory() = default; + struct Setup { Stats stats; vespalib::duration minTime; @@ -223,6 +250,7 @@ struct WandSetup : Setup { uint32_t weight; MatchData::UP matchData; WandSetup(WandFactory &f, uint32_t c, uint32_t l) : Setup(), factory(f), childCnt(c), limit(l), weight(100), matchData() {} + ~WandSetup() override; virtual std::string name() const override { return make_string("Wand Setup (terms=%u,docs=%u) [%s]", childCnt, limit, factory.name().c_str()); } @@ -242,4 +270,6 @@ struct WandSetup : Setup { } }; +WandSetup::~WandSetup() = default; + } // namespace <unnamed> diff --git a/searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp b/searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp index 213bbfc3493..906400f50a5 100644 --- a/searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp +++ b/searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp @@ -235,6 +235,8 @@ public: set_allow_termwise_eval(true); } + ~LocationPreFilterBlueprint(); + bool should_use() const { return _should_use; } SearchIterator::UP @@ -258,6 +260,8 @@ public: } }; +LocationPreFilterBlueprint::~LocationPreFilterBlueprint() = default; + //----------------------------------------------------------------------------- class LocationPostFilterBlueprint : public ComplexLeafBlueprint @@ -282,6 +286,8 @@ public: setEstimate(estimate); } + ~LocationPostFilterBlueprint(); + const common::Location &location() const { return _location; } SearchIterator::UP @@ -334,6 +340,8 @@ make_location_blueprint(const FieldSpec &field, const IAttributeVector &attribut return root; } +LocationPostFilterBlueprint::~LocationPostFilterBlueprint() = default; + class LookupKey : public IDocumentWeightAttribute::LookupKey { public: LookupKey(MultiTerm & terms, uint32_t index) : _terms(terms), _index(index) {} @@ -381,6 +389,7 @@ public: _weights.reserve(size_hint); _terms.reserve(size_hint); } + ~DirectWeightedSetBlueprint() override; void addTerm(const IDocumentWeightAttribute::LookupKey & key, int32_t weight) { IDocumentWeightAttribute::LookupResult result = _attr.lookup(key, _dictionary_snapshot); @@ -423,6 +432,9 @@ public: }; template <typename SearchType> +DirectWeightedSetBlueprint<SearchType>::~DirectWeightedSetBlueprint() = default; + +template <typename SearchType> std::unique_ptr<SearchIterator> DirectWeightedSetBlueprint<SearchType>::createFilterSearch(bool, FilterConstraint) const { @@ -467,6 +479,8 @@ public: _terms.reserve(size_hint); } + ~DirectWandBlueprint(); + void addTerm(const IDocumentWeightAttribute::LookupKey & key, int32_t weight) { IDocumentWeightAttribute::LookupResult result = _attr.lookup(key, _dictionary_snapshot); HitEstimate childEst(result.posting_size, (result.posting_size == 0)); @@ -497,6 +511,8 @@ public: bool always_needs_unpack() const override { return true; } }; +DirectWandBlueprint::~DirectWandBlueprint() = default; + std::unique_ptr<SearchIterator> DirectWandBlueprint::createFilterSearch(bool, FilterConstraint constraint) const { diff --git a/searchlib/src/vespa/searchlib/attribute/extendableattributes.h b/searchlib/src/vespa/searchlib/attribute/extendableattributes.h index 33b8544f9fe..bb8197c1908 100644 --- a/searchlib/src/vespa/searchlib/attribute/extendableattributes.h +++ b/searchlib/src/vespa/searchlib/attribute/extendableattributes.h @@ -124,6 +124,7 @@ public: MultiExtAttribute(const vespalib::string &name) : Super(name, Config(BasicType::fromType(static_cast<T>(0)), attribute::CollectionType::ARRAY)) {} + ~MultiExtAttribute() override; bool addDoc(typename Super::DocId &docId) override { docId = this->_idx.size() - 1; @@ -147,6 +148,9 @@ public: } }; +template <typename T> +MultiExtAttribute<T>::~MultiExtAttribute() = default; + typedef MultiExtAttribute<int8_t> MultiInt8ExtAttribute; typedef MultiExtAttribute<int16_t> MultiInt16ExtAttribute; typedef MultiExtAttribute<int32_t> MultiInt32ExtAttribute; diff --git a/searchlib/src/vespa/searchlib/attribute/sourceselector.cpp b/searchlib/src/vespa/searchlib/attribute/sourceselector.cpp index 3bc85783c2f..0a39e5defc9 100644 --- a/searchlib/src/vespa/searchlib/attribute/sourceselector.cpp +++ b/searchlib/src/vespa/searchlib/attribute/sourceselector.cpp @@ -64,6 +64,7 @@ SourceSelector::SaveInfo::SaveInfo(const vespalib::string & baseFileName, sourceStore.save(_memSaver, _header._baseFileName); } +SourceSelector::SaveInfo::~SaveInfo() = default; bool SourceSelector::SaveInfo::save(const TuneFileAttributes &tuneFileAttributes, const FileHeaderContext &fileHeaderContext) diff --git a/searchlib/src/vespa/searchlib/attribute/sourceselector.h b/searchlib/src/vespa/searchlib/attribute/sourceselector.h index 7ab79ea34e8..de92abf212e 100644 --- a/searchlib/src/vespa/searchlib/attribute/sourceselector.h +++ b/searchlib/src/vespa/searchlib/attribute/sourceselector.h @@ -42,6 +42,7 @@ public: uint32_t baseId, uint32_t docIdLimit, AttributeVector & sourceStore); + ~SaveInfo(); const HeaderInfo & getHeader() const { return _header; } bool save(const TuneFileAttributes &tuneFileAttributes, const search::common::FileHeaderContext &fileHeaderContext); diff --git a/searchlib/src/vespa/searchlib/expression/rawbucketresultnode.cpp b/searchlib/src/vespa/searchlib/expression/rawbucketresultnode.cpp index 180151264a8..89ea14a94ac 100644 --- a/searchlib/src/vespa/searchlib/expression/rawbucketresultnode.cpp +++ b/searchlib/src/vespa/searchlib/expression/rawbucketresultnode.cpp @@ -40,8 +40,14 @@ RawBucketResultNode::RawBucketResultNode() _to(new RawResultNode()) {} +RawBucketResultNode::RawBucketResultNode(const RawBucketResultNode&) = default; + RawBucketResultNode::~RawBucketResultNode() = default; +RawBucketResultNode& RawBucketResultNode::operator=(const RawBucketResultNode&) = default; + +RawBucketResultNode& RawBucketResultNode::operator=(RawBucketResultNode&&) noexcept = default; + int RawBucketResultNode::onCmp(const Identifiable & rhs) const { diff --git a/searchlib/src/vespa/searchlib/expression/rawbucketresultnode.h b/searchlib/src/vespa/searchlib/expression/rawbucketresultnode.h index eaca52de4f6..436304a3dce 100644 --- a/searchlib/src/vespa/searchlib/expression/rawbucketresultnode.h +++ b/searchlib/src/vespa/searchlib/expression/rawbucketresultnode.h @@ -23,8 +23,12 @@ public: DECLARE_EXPRESSIONNODE(RawBucketResultNode); DECLARE_NBO_SERIALIZE; RawBucketResultNode(); + RawBucketResultNode(const RawBucketResultNode&); + RawBucketResultNode(RawBucketResultNode&&) noexcept = default; RawBucketResultNode(ResultNode::UP from, ResultNode::UP to) : _from(from.release()), _to(to.release()) {} ~RawBucketResultNode(); + RawBucketResultNode& operator=(const RawBucketResultNode&); + RawBucketResultNode& operator=(RawBucketResultNode&&) noexcept; size_t hash() const override; int onCmp(const Identifiable & b) const override; int contains(const RawBucketResultNode & b) const; diff --git a/searchlib/src/vespa/searchlib/expression/stringbucketresultnode.cpp b/searchlib/src/vespa/searchlib/expression/stringbucketresultnode.cpp index 6958bba2fba..5aadddfa0e2 100644 --- a/searchlib/src/vespa/searchlib/expression/stringbucketresultnode.cpp +++ b/searchlib/src/vespa/searchlib/expression/stringbucketresultnode.cpp @@ -9,6 +9,12 @@ IMPLEMENT_RESULTNODE(StringBucketResultNode, BucketResultNode); StringBucketResultNode StringBucketResultNode::_nullResult; +StringBucketResultNode::StringBucketResultNode(const StringBucketResultNode&) = default; + +StringBucketResultNode& StringBucketResultNode::operator=(const StringBucketResultNode&) = default; + +StringBucketResultNode& StringBucketResultNode::operator=(StringBucketResultNode&&) = default; + size_t StringBucketResultNode::hash() const { diff --git a/searchlib/src/vespa/searchlib/expression/stringbucketresultnode.h b/searchlib/src/vespa/searchlib/expression/stringbucketresultnode.h index 59120680732..bf270d64729 100644 --- a/searchlib/src/vespa/searchlib/expression/stringbucketresultnode.h +++ b/searchlib/src/vespa/searchlib/expression/stringbucketresultnode.h @@ -23,9 +23,13 @@ public: DECLARE_EXPRESSIONNODE(StringBucketResultNode); DECLARE_NBO_SERIALIZE; StringBucketResultNode(); + StringBucketResultNode(const StringBucketResultNode&); + StringBucketResultNode(StringBucketResultNode&&) noexcept = default; StringBucketResultNode(vespalib::stringref from, vespalib::stringref to); StringBucketResultNode(ResultNode::UP from, ResultNode::UP to) : _from(from.release()), _to(to.release()) {} ~StringBucketResultNode(); + StringBucketResultNode& operator=(const StringBucketResultNode&); + StringBucketResultNode& operator=(StringBucketResultNode&&); size_t hash() const override; int onCmp(const Identifiable & b) const override; int contains(const StringBucketResultNode & b) const; diff --git a/searchlib/src/vespa/searchlib/features/closenessfeature.cpp b/searchlib/src/vespa/searchlib/features/closenessfeature.cpp index e98573d7a6b..04fc2a263be 100644 --- a/searchlib/src/vespa/searchlib/features/closenessfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/closenessfeature.cpp @@ -107,6 +107,8 @@ ClosenessBlueprint::ClosenessBlueprint() : { } +ClosenessBlueprint::~ClosenessBlueprint() = default; + void ClosenessBlueprint::visitDumpFeatures(const IIndexEnvironment &, IDumpFeatureVisitor &) const diff --git a/searchlib/src/vespa/searchlib/features/closenessfeature.h b/searchlib/src/vespa/searchlib/features/closenessfeature.h index e45cf9687e0..799495eaff5 100644 --- a/searchlib/src/vespa/searchlib/features/closenessfeature.h +++ b/searchlib/src/vespa/searchlib/features/closenessfeature.h @@ -38,6 +38,7 @@ private: public: ClosenessBlueprint(); + ~ClosenessBlueprint() override; void visitDumpFeatures(const fef::IIndexEnvironment & env, fef::IDumpFeatureVisitor & visitor) const override; fef::Blueprint::UP createInstance() const override; fef::ParameterDescriptions getDescriptions() const override { diff --git a/searchlib/src/vespa/searchlib/features/element_completeness_feature.cpp b/searchlib/src/vespa/searchlib/features/element_completeness_feature.cpp index 3b481ac69f1..3edfecd9a2c 100644 --- a/searchlib/src/vespa/searchlib/features/element_completeness_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/element_completeness_feature.cpp @@ -96,6 +96,8 @@ ElementCompletenessBlueprint::ElementCompletenessBlueprint() _output.push_back("elementWeight"); } +ElementCompletenessBlueprint::~ElementCompletenessBlueprint() = default; + void ElementCompletenessBlueprint::visitDumpFeatures(const fef::IIndexEnvironment &env, fef::IDumpFeatureVisitor &visitor) const diff --git a/searchlib/src/vespa/searchlib/features/element_completeness_feature.h b/searchlib/src/vespa/searchlib/features/element_completeness_feature.h index 00e0d115f3d..2b1901184f4 100644 --- a/searchlib/src/vespa/searchlib/features/element_completeness_feature.h +++ b/searchlib/src/vespa/searchlib/features/element_completeness_feature.h @@ -100,7 +100,7 @@ private: public: ElementCompletenessBlueprint(); - + ~ElementCompletenessBlueprint() override; void visitDumpFeatures(const fef::IIndexEnvironment & env, fef::IDumpFeatureVisitor & visitor) const override; fef::Blueprint::UP createInstance() const override; diff --git a/searchlib/src/vespa/searchlib/features/item_raw_score_feature.cpp b/searchlib/src/vespa/searchlib/features/item_raw_score_feature.cpp index b02d336168b..586e086cf97 100644 --- a/searchlib/src/vespa/searchlib/features/item_raw_score_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/item_raw_score_feature.cpp @@ -49,6 +49,8 @@ SimpleItemRawScoreExecutor::handle_bind_match_data(const MatchData &md) //----------------------------------------------------------------------------- +ItemRawScoreBlueprint::~ItemRawScoreBlueprint() = default; + bool ItemRawScoreBlueprint::setup(const IIndexEnvironment &, const ParameterList ¶ms) diff --git a/searchlib/src/vespa/searchlib/features/item_raw_score_feature.h b/searchlib/src/vespa/searchlib/features/item_raw_score_feature.h index 312034b732f..3f93ca5ad75 100644 --- a/searchlib/src/vespa/searchlib/features/item_raw_score_feature.h +++ b/searchlib/src/vespa/searchlib/features/item_raw_score_feature.h @@ -46,6 +46,7 @@ private: vespalib::string _label; public: ItemRawScoreBlueprint() : Blueprint("itemRawScore"), _label() {} + ~ItemRawScoreBlueprint() override; void visitDumpFeatures(const fef::IIndexEnvironment &, fef::IDumpFeatureVisitor &) const override {} fef::Blueprint::UP createInstance() const override { return Blueprint::UP(new ItemRawScoreBlueprint()); diff --git a/searchlib/src/vespa/searchlib/features/native_dot_product_feature.cpp b/searchlib/src/vespa/searchlib/features/native_dot_product_feature.cpp index 8b47c4e9e81..9472814f581 100644 --- a/searchlib/src/vespa/searchlib/features/native_dot_product_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/native_dot_product_feature.cpp @@ -59,6 +59,8 @@ NativeDotProductExecutor::handle_bind_match_data(const fef::MatchData &md) //----------------------------------------------------------------------------- +NativeDotProductBlueprint::~NativeDotProductBlueprint() = default; + bool NativeDotProductBlueprint::setup(const IIndexEnvironment &, const ParameterList ¶ms) diff --git a/searchlib/src/vespa/searchlib/features/native_dot_product_feature.h b/searchlib/src/vespa/searchlib/features/native_dot_product_feature.h index adff5663b92..c546ed86501 100644 --- a/searchlib/src/vespa/searchlib/features/native_dot_product_feature.h +++ b/searchlib/src/vespa/searchlib/features/native_dot_product_feature.h @@ -31,6 +31,7 @@ private: const fef::FieldInfo *_field; public: NativeDotProductBlueprint() : Blueprint("nativeDotProduct"), _field(nullptr) {} + ~NativeDotProductBlueprint() override; void visitDumpFeatures(const fef::IIndexEnvironment &, fef::IDumpFeatureVisitor &) const override {} fef::Blueprint::UP createInstance() const override { return Blueprint::UP(new NativeDotProductBlueprint()); diff --git a/searchlib/src/vespa/searchlib/features/raw_score_feature.cpp b/searchlib/src/vespa/searchlib/features/raw_score_feature.cpp index bedb62e79e4..4e4426a5dab 100644 --- a/searchlib/src/vespa/searchlib/features/raw_score_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/raw_score_feature.cpp @@ -43,6 +43,8 @@ RawScoreExecutor::handle_bind_match_data(const fef::MatchData &md) //----------------------------------------------------------------------------- +RawScoreBlueprint::~RawScoreBlueprint() = default; + bool RawScoreBlueprint::setup(const IIndexEnvironment &, const ParameterList ¶ms) { diff --git a/searchlib/src/vespa/searchlib/features/raw_score_feature.h b/searchlib/src/vespa/searchlib/features/raw_score_feature.h index 6344b527595..14106522d38 100644 --- a/searchlib/src/vespa/searchlib/features/raw_score_feature.h +++ b/searchlib/src/vespa/searchlib/features/raw_score_feature.h @@ -26,6 +26,7 @@ private: const fef::FieldInfo *_field; public: RawScoreBlueprint() : Blueprint("rawScore"), _field(0) {} + ~RawScoreBlueprint() override; void visitDumpFeatures(const fef::IIndexEnvironment &, fef::IDumpFeatureVisitor &) const override {} fef::Blueprint::UP createInstance() const override { diff --git a/searchlib/src/vespa/searchlib/features/subqueries_feature.cpp b/searchlib/src/vespa/searchlib/features/subqueries_feature.cpp index 66a052ee0a2..779e14c8304 100644 --- a/searchlib/src/vespa/searchlib/features/subqueries_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/subqueries_feature.cpp @@ -44,6 +44,8 @@ SubqueriesExecutor::handle_bind_match_data(const fef::MatchData &md) //----------------------------------------------------------------------------- +SubqueriesBlueprint::~SubqueriesBlueprint() = default; + bool SubqueriesBlueprint::setup(const IIndexEnvironment &, const ParameterList ¶ms) { _field = params[0].asField(); diff --git a/searchlib/src/vespa/searchlib/features/subqueries_feature.h b/searchlib/src/vespa/searchlib/features/subqueries_feature.h index fefda9406bd..4637dfb2414 100644 --- a/searchlib/src/vespa/searchlib/features/subqueries_feature.h +++ b/searchlib/src/vespa/searchlib/features/subqueries_feature.h @@ -24,6 +24,7 @@ private: const fef::FieldInfo *_field; public: SubqueriesBlueprint() : Blueprint("subqueries"), _field(nullptr) {} + ~SubqueriesBlueprint() override; void visitDumpFeatures(const fef::IIndexEnvironment &, fef::IDumpFeatureVisitor &) const override {} fef::Blueprint::UP createInstance() const override { return Blueprint::UP(new SubqueriesBlueprint); diff --git a/searchlib/src/vespa/searchlib/features/text_similarity_feature.cpp b/searchlib/src/vespa/searchlib/features/text_similarity_feature.cpp index 2723469aa67..495bb766e32 100644 --- a/searchlib/src/vespa/searchlib/features/text_similarity_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/text_similarity_feature.cpp @@ -172,6 +172,8 @@ const vespalib::string TextSimilarityBlueprint::field_coverage_output("fieldCove TextSimilarityBlueprint::TextSimilarityBlueprint() : Blueprint("textSimilarity"), _field_id(fef::IllegalHandle) {} +TextSimilarityBlueprint::~TextSimilarityBlueprint() = default; + void TextSimilarityBlueprint::visitDumpFeatures(const fef::IIndexEnvironment &env, fef::IDumpFeatureVisitor &visitor) const diff --git a/searchlib/src/vespa/searchlib/features/text_similarity_feature.h b/searchlib/src/vespa/searchlib/features/text_similarity_feature.h index f7cd259b769..dddd8d89619 100644 --- a/searchlib/src/vespa/searchlib/features/text_similarity_feature.h +++ b/searchlib/src/vespa/searchlib/features/text_similarity_feature.h @@ -57,6 +57,7 @@ private: public: TextSimilarityBlueprint(); + ~TextSimilarityBlueprint() override; void visitDumpFeatures(const fef::IIndexEnvironment &env, fef::IDumpFeatureVisitor &visitor) const override; fef::Blueprint::UP createInstance() const override; fef::ParameterDescriptions getDescriptions() const override { diff --git a/searchlib/src/vespa/searchlib/fef/test/labels.cpp b/searchlib/src/vespa/searchlib/fef/test/labels.cpp index ee937600ac2..6e7c144cc7d 100644 --- a/searchlib/src/vespa/searchlib/fef/test/labels.cpp +++ b/searchlib/src/vespa/searchlib/fef/test/labels.cpp @@ -1,3 +1,9 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "labels.h" + +namespace search::fef::test { + +NoLabel::~NoLabel() = default; + +} diff --git a/searchlib/src/vespa/searchlib/fef/test/labels.h b/searchlib/src/vespa/searchlib/fef/test/labels.h index b76a145f922..5f27f786405 100644 --- a/searchlib/src/vespa/searchlib/fef/test/labels.h +++ b/searchlib/src/vespa/searchlib/fef/test/labels.h @@ -10,7 +10,8 @@ struct Labels { virtual ~Labels() {} }; struct NoLabel : public Labels { - virtual void inject(Properties &) const override {} + virtual void inject(Properties &) const override {} + ~NoLabel() override; }; struct SingleLabel : public Labels { vespalib::string label; diff --git a/searchlib/src/vespa/searchlib/query/tree/CMakeLists.txt b/searchlib/src/vespa/searchlib/query/tree/CMakeLists.txt index ec9156fbb52..4fcec251caa 100644 --- a/searchlib/src/vespa/searchlib/query/tree/CMakeLists.txt +++ b/searchlib/src/vespa/searchlib/query/tree/CMakeLists.txt @@ -5,6 +5,7 @@ vespa_add_library(searchlib_query_tree OBJECT intermediate.cpp intermediatenodes.cpp querybuilder.cpp + simplequery.cpp stackdumpcreator.cpp term.cpp location.cpp diff --git a/searchlib/src/vespa/searchlib/query/tree/simplequery.cpp b/searchlib/src/vespa/searchlib/query/tree/simplequery.cpp new file mode 100644 index 00000000000..cad97279b4c --- /dev/null +++ b/searchlib/src/vespa/searchlib/query/tree/simplequery.cpp @@ -0,0 +1,55 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#include "simplequery.h" + +namespace search::query { + +SimpleTrue::~SimpleTrue() = default; + +SimpleFalse::~SimpleFalse() = default; + +SimpleAnd::~SimpleAnd() = default; + +SimpleAndNot::~SimpleAndNot() = default; + +SimpleNear::~SimpleNear() = default; + +SimpleONear::~SimpleONear() = default; + +SimpleOr::~SimpleOr() = default; + +SimpleEquiv::~SimpleEquiv() = default; + +SimplePhrase::~SimplePhrase() = default; + +SimpleSameElement::~SimpleSameElement() = default; + +SimpleWeightedSetTerm::~SimpleWeightedSetTerm() = default; + +SimpleDotProduct::~SimpleDotProduct() = default; + +SimpleWandTerm::~SimpleWandTerm() = default; + +SimpleRank::~SimpleRank() = default; + +SimpleNumberTerm::~SimpleNumberTerm() = default; + +SimpleLocationTerm::~SimpleLocationTerm() = default; + +SimplePrefixTerm::~SimplePrefixTerm() = default; + +SimpleRangeTerm::~SimpleRangeTerm() = default; + +SimpleStringTerm::~SimpleStringTerm() = default; + +SimpleSubstringTerm::~SimpleSubstringTerm() = default; + +SimpleSuffixTerm::~SimpleSuffixTerm() = default; + +SimplePredicateQuery::~SimplePredicateQuery() = default; + +SimpleRegExpTerm::~SimpleRegExpTerm() = default; + +SimpleNearestNeighborTerm::~SimpleNearestNeighborTerm() = default; + +} diff --git a/searchlib/src/vespa/searchlib/query/tree/simplequery.h b/searchlib/src/vespa/searchlib/query/tree/simplequery.h index 0e52698c915..5047e072cb7 100644 --- a/searchlib/src/vespa/searchlib/query/tree/simplequery.h +++ b/searchlib/src/vespa/searchlib/query/tree/simplequery.h @@ -13,13 +13,30 @@ namespace search::query { -struct SimpleTrue : TrueQueryNode {}; -struct SimpleFalse : FalseQueryNode {}; -struct SimpleAnd : And {}; -struct SimpleAndNot : AndNot {}; -struct SimpleNear : Near { SimpleNear(size_t dist) : Near(dist) {} }; -struct SimpleONear : ONear { SimpleONear(size_t dist) : ONear(dist) {} }; -struct SimpleOr : Or {}; +struct SimpleTrue : TrueQueryNode { + ~SimpleTrue() override; +}; +struct SimpleFalse : FalseQueryNode { + ~SimpleFalse() override; +}; +struct SimpleAnd : And { + ~SimpleAnd() override; +}; +struct SimpleAndNot : AndNot { + ~SimpleAndNot() override; +}; +struct SimpleNear : Near { + SimpleNear(size_t dist) : Near(dist) {} + ~SimpleNear() override; +}; +struct SimpleONear : ONear { + SimpleONear(size_t dist) : ONear(dist) {} + ~SimpleONear() override; +}; +struct SimpleOr : Or +{ + ~SimpleOr() override; +}; struct SimpleWeakAnd : WeakAnd { SimpleWeakAnd(uint32_t minHits, vespalib::stringref view) : WeakAnd(minHits, view) @@ -28,70 +45,86 @@ struct SimpleWeakAnd : WeakAnd { struct SimpleEquiv : Equiv { SimpleEquiv(int32_t id, Weight weight) : Equiv(id, weight) {} + ~SimpleEquiv() override; }; struct SimplePhrase : Phrase { SimplePhrase(vespalib::stringref view, int32_t id, Weight weight) : Phrase(view, id, weight) {} + ~SimplePhrase() override; }; struct SimpleSameElement : SameElement { SimpleSameElement(vespalib::stringref view) : SameElement(view) {} + ~SimpleSameElement() override; }; struct SimpleWeightedSetTerm : WeightedSetTerm { SimpleWeightedSetTerm(uint32_t num_terms, vespalib::stringref view, int32_t id, Weight weight) : WeightedSetTerm(num_terms, view, id, weight) {} + ~SimpleWeightedSetTerm() override; }; struct SimpleDotProduct : DotProduct { SimpleDotProduct(uint32_t num_terms, vespalib::stringref view, int32_t id, Weight weight) : DotProduct(num_terms, view, id, weight) {} + ~SimpleDotProduct() override; }; struct SimpleWandTerm : WandTerm { SimpleWandTerm(uint32_t num_terms, vespalib::stringref view, int32_t id, Weight weight, uint32_t targetNumHits, int64_t scoreThreshold, double thresholdBoostFactor) : WandTerm(num_terms, view, id, weight, targetNumHits, scoreThreshold, thresholdBoostFactor) {} + ~SimpleWandTerm() override; +}; +struct SimpleRank : Rank +{ + ~SimpleRank() override; }; -struct SimpleRank : Rank {}; struct SimpleNumberTerm : NumberTerm { SimpleNumberTerm(Type term, vespalib::stringref view, int32_t id, Weight weight) : NumberTerm(term, view, id, weight) { } + ~SimpleNumberTerm() override; }; struct SimpleLocationTerm : LocationTerm { SimpleLocationTerm(const Type &term, vespalib::stringref view, int32_t id, Weight weight) : LocationTerm(term, view, id, weight) { } + ~SimpleLocationTerm() override; }; struct SimplePrefixTerm : PrefixTerm { SimplePrefixTerm(const Type &term, vespalib::stringref view, int32_t id, Weight weight) : PrefixTerm(term, view, id, weight) { } + ~SimplePrefixTerm() override; }; struct SimpleRangeTerm : RangeTerm { SimpleRangeTerm(const Type &term, vespalib::stringref view, int32_t id, Weight weight) : RangeTerm(term, view, id, weight) { } + ~SimpleRangeTerm() override; }; struct SimpleStringTerm : StringTerm { SimpleStringTerm(const Type &term, vespalib::stringref view, int32_t id, Weight weight) : StringTerm(term, view, id, weight) { } + ~SimpleStringTerm() override; }; struct SimpleSubstringTerm : SubstringTerm { SimpleSubstringTerm(const Type &term, vespalib::stringref view, int32_t id, Weight weight) : SubstringTerm(term, view, id, weight) { } + ~SimpleSubstringTerm() override; }; struct SimpleSuffixTerm : SuffixTerm { SimpleSuffixTerm(const Type &term, vespalib::stringref view, int32_t id, Weight weight) : SuffixTerm(term, view, id, weight) { } + ~SimpleSuffixTerm() override; }; struct SimplePredicateQuery : PredicateQuery { SimplePredicateQuery(PredicateQueryTerm::UP term, @@ -99,12 +132,14 @@ struct SimplePredicateQuery : PredicateQuery { int32_t id, Weight weight) : PredicateQuery(std::move(term), view, id, weight) { } + ~SimplePredicateQuery() override; }; struct SimpleRegExpTerm : RegExpTerm { SimpleRegExpTerm(const Type &term, vespalib::stringref view, int32_t id, Weight weight) : RegExpTerm(term, view, id, weight) { } + ~SimpleRegExpTerm() override; }; struct SimpleNearestNeighborTerm : NearestNeighborTerm { SimpleNearestNeighborTerm(vespalib::stringref query_tensor_name, vespalib::stringref field_name, @@ -115,6 +150,7 @@ struct SimpleNearestNeighborTerm : NearestNeighborTerm { target_num_hits, allow_approximate, explore_additional_hits, distance_threshold) {} + ~SimpleNearestNeighborTerm() override; }; diff --git a/searchlib/src/vespa/searchlib/queryeval/CMakeLists.txt b/searchlib/src/vespa/searchlib/queryeval/CMakeLists.txt index 214fb19b7ce..840f5b6b376 100644 --- a/searchlib/src/vespa/searchlib/queryeval/CMakeLists.txt +++ b/searchlib/src/vespa/searchlib/queryeval/CMakeLists.txt @@ -40,6 +40,7 @@ vespa_add_library(searchlib_queryeval OBJECT nearsearch.cpp nns_index_iterator.cpp orsearch.cpp + posting_info.cpp predicate_blueprint.cpp predicate_search.cpp ranksearch.cpp diff --git a/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.cpp b/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.cpp index 997d3013971..79d78c3faab 100644 --- a/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.cpp +++ b/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.cpp @@ -296,6 +296,8 @@ AndBlueprint::computeNextHitRate(const Blueprint & child, double hitRate) const //----------------------------------------------------------------------------- +OrBlueprint::~OrBlueprint() = default; + Blueprint::HitEstimate OrBlueprint::combine(const std::vector<HitEstimate> &data) const { diff --git a/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.h b/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.h index b708ae3078e..c8bd26fe4a7 100644 --- a/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.h +++ b/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.h @@ -60,6 +60,7 @@ private: class OrBlueprint : public IntermediateBlueprint { public: + ~OrBlueprint() override; bool supports_termwise_children() const override { return true; } HitEstimate combine(const std::vector<HitEstimate> &data) const override; FieldSpecBaseList exposeFields() const override; diff --git a/searchlib/src/vespa/searchlib/queryeval/posting_info.cpp b/searchlib/src/vespa/searchlib/queryeval/posting_info.cpp new file mode 100644 index 00000000000..4b7b09b76c1 --- /dev/null +++ b/searchlib/src/vespa/searchlib/queryeval/posting_info.cpp @@ -0,0 +1,9 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#include "posting_info.h" + +namespace search::queryeval { + +MinMaxPostingInfo::~MinMaxPostingInfo() = default; + +} diff --git a/searchlib/src/vespa/searchlib/queryeval/posting_info.h b/searchlib/src/vespa/searchlib/queryeval/posting_info.h index 27c2eae56fb..c3fa5470e48 100644 --- a/searchlib/src/vespa/searchlib/queryeval/posting_info.h +++ b/searchlib/src/vespa/searchlib/queryeval/posting_info.h @@ -34,6 +34,7 @@ public: _minWeight(minWeight), _maxWeight(maxWeight) {} + ~MinMaxPostingInfo() override; int32_t getMinWeight() const { return _minWeight; } int32_t getMaxWeight() const { return _maxWeight; } }; diff --git a/searchlib/src/vespa/searchlib/queryeval/test/CMakeLists.txt b/searchlib/src/vespa/searchlib/queryeval/test/CMakeLists.txt index 925d0b9b6be..b3a19d7533e 100644 --- a/searchlib/src/vespa/searchlib/queryeval/test/CMakeLists.txt +++ b/searchlib/src/vespa/searchlib/queryeval/test/CMakeLists.txt @@ -1,5 +1,6 @@ # Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -vespa_add_library(searchlib_queryeval_test INTERFACE +vespa_add_library(searchlib_queryeval_test STATIC SOURCES + searchhistory.cpp DEPENDS ) diff --git a/searchlib/src/vespa/searchlib/queryeval/test/searchhistory.cpp b/searchlib/src/vespa/searchlib/queryeval/test/searchhistory.cpp new file mode 100644 index 00000000000..700b951d8ca --- /dev/null +++ b/searchlib/src/vespa/searchlib/queryeval/test/searchhistory.cpp @@ -0,0 +1,11 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#include "searchhistory.h" + +namespace search::queryeval::test { + +SearchHistory::Entry::Entry(const Entry&) = default; + +SearchHistory::Entry& SearchHistory::Entry::operator=(const Entry&) = default; + +} diff --git a/searchlib/src/vespa/searchlib/queryeval/test/searchhistory.h b/searchlib/src/vespa/searchlib/queryeval/test/searchhistory.h index 17e3cc49444..9b31577cd9c 100644 --- a/searchlib/src/vespa/searchlib/queryeval/test/searchhistory.h +++ b/searchlib/src/vespa/searchlib/queryeval/test/searchhistory.h @@ -17,7 +17,11 @@ struct SearchHistory { uint32_t docid; Entry(const std::string &t, const std::string &o, uint32_t id) : target(t), op(o), docid(id) {} + Entry(const Entry&); + Entry(Entry&&) noexcept = default; ~Entry() {} + Entry& operator=(const Entry&); + Entry& operator=(Entry&&) noexcept = default; bool operator==(const Entry &rhs) const { return ((target == rhs.target) && (op == rhs.op) && |