From dd155329562cb4477a1e449f990b4fc394d85e11 Mon Sep 17 00:00:00 2001 From: HÃ¥vard Pettersen Date: Fri, 8 Sep 2017 11:24:59 +0000 Subject: pass cost MatchData to executors --- searchlib/src/vespa/searchlib/features/attributematchfeature.cpp | 2 +- searchlib/src/vespa/searchlib/features/attributematchfeature.h | 4 ++-- .../src/vespa/searchlib/features/element_completeness_feature.cpp | 2 +- searchlib/src/vespa/searchlib/features/element_completeness_feature.h | 2 +- searchlib/src/vespa/searchlib/features/element_similarity_feature.cpp | 2 +- searchlib/src/vespa/searchlib/features/fieldinfofeature.cpp | 4 ++-- searchlib/src/vespa/searchlib/features/fieldinfofeature.h | 4 ++-- searchlib/src/vespa/searchlib/features/fieldlengthfeature.cpp | 2 +- searchlib/src/vespa/searchlib/features/fieldlengthfeature.h | 2 +- searchlib/src/vespa/searchlib/features/fieldmatchfeature.cpp | 2 +- searchlib/src/vespa/searchlib/features/fieldmatchfeature.h | 2 +- searchlib/src/vespa/searchlib/features/fieldtermmatchfeature.cpp | 2 +- searchlib/src/vespa/searchlib/features/fieldtermmatchfeature.h | 2 +- searchlib/src/vespa/searchlib/features/flow_completeness_feature.cpp | 2 +- searchlib/src/vespa/searchlib/features/flow_completeness_feature.h | 2 +- searchlib/src/vespa/searchlib/features/item_raw_score_feature.cpp | 4 ++-- searchlib/src/vespa/searchlib/features/item_raw_score_feature.h | 4 ++-- searchlib/src/vespa/searchlib/features/jarowinklerdistancefeature.cpp | 2 +- searchlib/src/vespa/searchlib/features/jarowinklerdistancefeature.h | 2 +- searchlib/src/vespa/searchlib/features/matchcountfeature.cpp | 2 +- searchlib/src/vespa/searchlib/features/matchcountfeature.h | 2 +- searchlib/src/vespa/searchlib/features/matchesfeature.cpp | 2 +- searchlib/src/vespa/searchlib/features/matchesfeature.h | 2 +- searchlib/src/vespa/searchlib/features/native_dot_product_feature.cpp | 2 +- searchlib/src/vespa/searchlib/features/native_dot_product_feature.h | 2 +- .../src/vespa/searchlib/features/nativeattributematchfeature.cpp | 4 ++-- searchlib/src/vespa/searchlib/features/nativeattributematchfeature.h | 4 ++-- searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.cpp | 2 +- searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.h | 2 +- searchlib/src/vespa/searchlib/features/nativeproximityfeature.cpp | 2 +- searchlib/src/vespa/searchlib/features/nativeproximityfeature.h | 2 +- searchlib/src/vespa/searchlib/features/proximityfeature.cpp | 2 +- searchlib/src/vespa/searchlib/features/proximityfeature.h | 2 +- searchlib/src/vespa/searchlib/features/querycompletenessfeature.cpp | 2 +- searchlib/src/vespa/searchlib/features/querycompletenessfeature.h | 2 +- searchlib/src/vespa/searchlib/features/raw_score_feature.cpp | 2 +- searchlib/src/vespa/searchlib/features/raw_score_feature.h | 2 +- searchlib/src/vespa/searchlib/features/reverseproximityfeature.cpp | 2 +- searchlib/src/vespa/searchlib/features/reverseproximityfeature.h | 2 +- searchlib/src/vespa/searchlib/features/subqueries_feature.cpp | 2 +- searchlib/src/vespa/searchlib/features/subqueries_feature.h | 2 +- searchlib/src/vespa/searchlib/features/term_field_md_feature.cpp | 2 +- searchlib/src/vespa/searchlib/features/term_field_md_feature.h | 2 +- searchlib/src/vespa/searchlib/features/termdistancefeature.cpp | 2 +- searchlib/src/vespa/searchlib/features/termdistancefeature.h | 2 +- searchlib/src/vespa/searchlib/features/termeditdistancefeature.cpp | 2 +- searchlib/src/vespa/searchlib/features/termeditdistancefeature.h | 2 +- searchlib/src/vespa/searchlib/features/text_similarity_feature.cpp | 2 +- searchlib/src/vespa/searchlib/features/text_similarity_feature.h | 2 +- searchlib/src/vespa/searchlib/fef/featureexecutor.cpp | 4 ++-- searchlib/src/vespa/searchlib/fef/featureexecutor.h | 4 ++-- searchlib/src/vespa/searchlib/fef/featureoverrider.cpp | 2 +- searchlib/src/vespa/searchlib/fef/featureoverrider.h | 2 +- 53 files changed, 62 insertions(+), 62 deletions(-) (limited to 'searchlib/src') diff --git a/searchlib/src/vespa/searchlib/features/attributematchfeature.cpp b/searchlib/src/vespa/searchlib/features/attributematchfeature.cpp index bf3297f3e14..2ff53951d8b 100644 --- a/searchlib/src/vespa/searchlib/features/attributematchfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/attributematchfeature.cpp @@ -253,7 +253,7 @@ AttributeMatchExecutor::execute(uint32_t docId) template void -AttributeMatchExecutor::handle_bind_match_data(MatchData &md) +AttributeMatchExecutor::handle_bind_match_data(const MatchData &md) { _cmp.bind_match_data(md); } diff --git a/searchlib/src/vespa/searchlib/features/attributematchfeature.h b/searchlib/src/vespa/searchlib/features/attributematchfeature.h index 8396493b81d..707572abf9e 100644 --- a/searchlib/src/vespa/searchlib/features/attributematchfeature.h +++ b/searchlib/src/vespa/searchlib/features/attributematchfeature.h @@ -69,12 +69,12 @@ private: feature_t getWeight() const; feature_t getSignificance() const; feature_t getImportance() const { return (getWeight() + getSignificance()) * 0.5; } - void bind_match_data(fef::MatchData &md) { _md = &md; } + void bind_match_data(const fef::MatchData &md) { _md = &md; } }; Computer _cmp; - virtual void handle_bind_match_data(fef::MatchData &md) override; + virtual void handle_bind_match_data(const fef::MatchData &md) override; public: /** diff --git a/searchlib/src/vespa/searchlib/features/element_completeness_feature.cpp b/searchlib/src/vespa/searchlib/features/element_completeness_feature.cpp index c3bb87379ad..18988281cbd 100644 --- a/searchlib/src/vespa/searchlib/features/element_completeness_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/element_completeness_feature.cpp @@ -73,7 +73,7 @@ ElementCompletenessExecutor::execute(uint32_t docId) } void -ElementCompletenessExecutor::handle_bind_match_data(fef::MatchData &md) +ElementCompletenessExecutor::handle_bind_match_data(const fef::MatchData &md) { _md = &md; } diff --git a/searchlib/src/vespa/searchlib/features/element_completeness_feature.h b/searchlib/src/vespa/searchlib/features/element_completeness_feature.h index 013efaedc22..1b835da45d2 100644 --- a/searchlib/src/vespa/searchlib/features/element_completeness_feature.h +++ b/searchlib/src/vespa/searchlib/features/element_completeness_feature.h @@ -82,7 +82,7 @@ private: static bool nextElement(Item &item); - void handle_bind_match_data(fef::MatchData &md) override; + void handle_bind_match_data(const fef::MatchData &md) override; public: ElementCompletenessExecutor(const fef::IQueryEnvironment &env, diff --git a/searchlib/src/vespa/searchlib/features/element_similarity_feature.cpp b/searchlib/src/vespa/searchlib/features/element_similarity_feature.cpp index e3c0217be15..c9eab238f82 100644 --- a/searchlib/src/vespa/searchlib/features/element_similarity_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/element_similarity_feature.cpp @@ -230,7 +230,7 @@ public: bool isPure() override { return _terms.handles.empty(); } - void handle_bind_match_data(fef::MatchData &md) override { + void handle_bind_match_data(const fef::MatchData &md) override { _md = &md; } diff --git a/searchlib/src/vespa/searchlib/features/fieldinfofeature.cpp b/searchlib/src/vespa/searchlib/features/fieldinfofeature.cpp index 85f3fc9b652..960dcc7dfd1 100644 --- a/searchlib/src/vespa/searchlib/features/fieldinfofeature.cpp +++ b/searchlib/src/vespa/searchlib/features/fieldinfofeature.cpp @@ -59,7 +59,7 @@ IndexFieldInfoExecutor::execute(uint32_t docId) } void -IndexFieldInfoExecutor::handle_bind_match_data(fef::MatchData &md) +IndexFieldInfoExecutor::handle_bind_match_data(const fef::MatchData &md) { _md = &md; } @@ -98,7 +98,7 @@ AttrFieldInfoExecutor::execute(uint32_t docId) } void -AttrFieldInfoExecutor::handle_bind_match_data(fef::MatchData &md) +AttrFieldInfoExecutor::handle_bind_match_data(const fef::MatchData &md) { _md = &md; } diff --git a/searchlib/src/vespa/searchlib/features/fieldinfofeature.h b/searchlib/src/vespa/searchlib/features/fieldinfofeature.h index 08cf99ed32a..7ced5d5cb9f 100644 --- a/searchlib/src/vespa/searchlib/features/fieldinfofeature.h +++ b/searchlib/src/vespa/searchlib/features/fieldinfofeature.h @@ -18,7 +18,7 @@ private: uint32_t _fieldHandle; const fef::MatchData *_md; - void handle_bind_match_data(fef::MatchData &md) override; + void handle_bind_match_data(const fef::MatchData &md) override; public: IndexFieldInfoExecutor(feature_t type, feature_t isFilter, @@ -35,7 +35,7 @@ private: uint32_t _fieldHandle; const fef::MatchData *_md; - void handle_bind_match_data(fef::MatchData &md) override; + void handle_bind_match_data(const fef::MatchData &md) override; public: AttrFieldInfoExecutor(feature_t type, uint32_t fieldHandle); diff --git a/searchlib/src/vespa/searchlib/features/fieldlengthfeature.cpp b/searchlib/src/vespa/searchlib/features/fieldlengthfeature.cpp index 0ec1f8bd038..d0680e8fc19 100644 --- a/searchlib/src/vespa/searchlib/features/fieldlengthfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/fieldlengthfeature.cpp @@ -56,7 +56,7 @@ FieldLengthExecutor::execute(uint32_t docId) } void -FieldLengthExecutor::handle_bind_match_data(MatchData &md) +FieldLengthExecutor::handle_bind_match_data(const MatchData &md) { _md = &md; } diff --git a/searchlib/src/vespa/searchlib/features/fieldlengthfeature.h b/searchlib/src/vespa/searchlib/features/fieldlengthfeature.h index a818a65d26e..4988bb97546 100644 --- a/searchlib/src/vespa/searchlib/features/fieldlengthfeature.h +++ b/searchlib/src/vespa/searchlib/features/fieldlengthfeature.h @@ -15,7 +15,7 @@ private: std::vector _fieldHandles; const fef::MatchData *_md; - virtual void handle_bind_match_data(fef::MatchData &md) override; + virtual void handle_bind_match_data(const fef::MatchData &md) override; public: /** diff --git a/searchlib/src/vespa/searchlib/features/fieldmatchfeature.cpp b/searchlib/src/vespa/searchlib/features/fieldmatchfeature.cpp index bea6e032e81..f5f8652461e 100644 --- a/searchlib/src/vespa/searchlib/features/fieldmatchfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/fieldmatchfeature.cpp @@ -86,7 +86,7 @@ FieldMatchExecutor::execute(uint32_t docId) } void -FieldMatchExecutor::handle_bind_match_data(fef::MatchData &md) +FieldMatchExecutor::handle_bind_match_data(const fef::MatchData &md) { _splitter.bind_match_data(md); } diff --git a/searchlib/src/vespa/searchlib/features/fieldmatchfeature.h b/searchlib/src/vespa/searchlib/features/fieldmatchfeature.h index 287af60b021..71ac1023df6 100644 --- a/searchlib/src/vespa/searchlib/features/fieldmatchfeature.h +++ b/searchlib/src/vespa/searchlib/features/fieldmatchfeature.h @@ -19,7 +19,7 @@ private: const fieldmatch::Params & _params; fieldmatch::Computer _cmp; - void handle_bind_match_data(fef::MatchData &md) override; + void handle_bind_match_data(const fef::MatchData &md) override; public: /** diff --git a/searchlib/src/vespa/searchlib/features/fieldtermmatchfeature.cpp b/searchlib/src/vespa/searchlib/features/fieldtermmatchfeature.cpp index 0f71d5dcbec..a7a00bee956 100644 --- a/searchlib/src/vespa/searchlib/features/fieldtermmatchfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/fieldtermmatchfeature.cpp @@ -63,7 +63,7 @@ FieldTermMatchExecutor::execute(uint32_t docId) } void -FieldTermMatchExecutor::handle_bind_match_data(fef::MatchData &md) +FieldTermMatchExecutor::handle_bind_match_data(const fef::MatchData &md) { _md = &md; } diff --git a/searchlib/src/vespa/searchlib/features/fieldtermmatchfeature.h b/searchlib/src/vespa/searchlib/features/fieldtermmatchfeature.h index 02dfa17ba33..0f89f7eeb75 100644 --- a/searchlib/src/vespa/searchlib/features/fieldtermmatchfeature.h +++ b/searchlib/src/vespa/searchlib/features/fieldtermmatchfeature.h @@ -27,7 +27,7 @@ private: fef::TermFieldHandle _fieldHandle; const fef::MatchData *_md; - void handle_bind_match_data(fef::MatchData &md) override; + void handle_bind_match_data(const fef::MatchData &md) override; }; /** diff --git a/searchlib/src/vespa/searchlib/features/flow_completeness_feature.cpp b/searchlib/src/vespa/searchlib/features/flow_completeness_feature.cpp index 5c93566698e..c46d602983d 100644 --- a/searchlib/src/vespa/searchlib/features/flow_completeness_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/flow_completeness_feature.cpp @@ -234,7 +234,7 @@ FlowCompletenessExecutor::execute(uint32_t) } void -FlowCompletenessExecutor::handle_bind_match_data(fef::MatchData &md) +FlowCompletenessExecutor::handle_bind_match_data(const fef::MatchData &md) { _md = &md; } diff --git a/searchlib/src/vespa/searchlib/features/flow_completeness_feature.h b/searchlib/src/vespa/searchlib/features/flow_completeness_feature.h index cdfa0356307..db5c53beac8 100644 --- a/searchlib/src/vespa/searchlib/features/flow_completeness_feature.h +++ b/searchlib/src/vespa/searchlib/features/flow_completeness_feature.h @@ -62,7 +62,7 @@ private: static bool nextElement(Item &item); - void handle_bind_match_data(fef::MatchData &md) override; + void handle_bind_match_data(const fef::MatchData &md) override; public: FlowCompletenessExecutor(const fef::IQueryEnvironment &env, 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 a7476185000..45baf646656 100644 --- a/searchlib/src/vespa/searchlib/features/item_raw_score_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/item_raw_score_feature.cpp @@ -23,7 +23,7 @@ ItemRawScoreExecutor::execute(uint32_t docId) } void -ItemRawScoreExecutor::handle_bind_match_data(MatchData &md) +ItemRawScoreExecutor::handle_bind_match_data(const MatchData &md) { _md = &md; } @@ -42,7 +42,7 @@ SimpleItemRawScoreExecutor::execute(uint32_t docId) } void -SimpleItemRawScoreExecutor::handle_bind_match_data(MatchData &md) +SimpleItemRawScoreExecutor::handle_bind_match_data(const MatchData &md) { _md = &md; } 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 3aa1672b05d..d6a55f29632 100644 --- a/searchlib/src/vespa/searchlib/features/item_raw_score_feature.h +++ b/searchlib/src/vespa/searchlib/features/item_raw_score_feature.h @@ -16,7 +16,7 @@ private: HandleVector _handles; const fef::MatchData *_md; - void handle_bind_match_data(fef::MatchData &md) override; + void handle_bind_match_data(const fef::MatchData &md) override; public: ItemRawScoreExecutor(HandleVector handles) @@ -30,7 +30,7 @@ private: fef::TermFieldHandle _handle; const fef::MatchData *_md; - void handle_bind_match_data(fef::MatchData &md) override; + void handle_bind_match_data(const fef::MatchData &md) override; public: SimpleItemRawScoreExecutor(fef::TermFieldHandle handle) diff --git a/searchlib/src/vespa/searchlib/features/jarowinklerdistancefeature.cpp b/searchlib/src/vespa/searchlib/features/jarowinklerdistancefeature.cpp index 3f4817d61d2..a5e3e2da5ba 100644 --- a/searchlib/src/vespa/searchlib/features/jarowinklerdistancefeature.cpp +++ b/searchlib/src/vespa/searchlib/features/jarowinklerdistancefeature.cpp @@ -59,7 +59,7 @@ JaroWinklerDistanceExecutor::execute(uint32_t docId) } void -JaroWinklerDistanceExecutor::handle_bind_match_data(fef::MatchData &md) +JaroWinklerDistanceExecutor::handle_bind_match_data(const fef::MatchData &md) { _md = &md; } diff --git a/searchlib/src/vespa/searchlib/features/jarowinklerdistancefeature.h b/searchlib/src/vespa/searchlib/features/jarowinklerdistancefeature.h index 0497d2a2f73..a8d6eacf0eb 100644 --- a/searchlib/src/vespa/searchlib/features/jarowinklerdistancefeature.h +++ b/searchlib/src/vespa/searchlib/features/jarowinklerdistancefeature.h @@ -43,7 +43,7 @@ private: std::vector _termFieldHandles; // The handles of all query terms. const fef::MatchData *_md; - void handle_bind_match_data(fef::MatchData &md) override; + void handle_bind_match_data(const fef::MatchData &md) override; }; /** diff --git a/searchlib/src/vespa/searchlib/features/matchcountfeature.cpp b/searchlib/src/vespa/searchlib/features/matchcountfeature.cpp index 51a7a952781..fd453e17eb1 100644 --- a/searchlib/src/vespa/searchlib/features/matchcountfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/matchcountfeature.cpp @@ -36,7 +36,7 @@ MatchCountExecutor::execute(uint32_t docId) } void -MatchCountExecutor::handle_bind_match_data(MatchData &md) +MatchCountExecutor::handle_bind_match_data(const MatchData &md) { _md = &md; } diff --git a/searchlib/src/vespa/searchlib/features/matchcountfeature.h b/searchlib/src/vespa/searchlib/features/matchcountfeature.h index c4123016e16..eadb5064c57 100644 --- a/searchlib/src/vespa/searchlib/features/matchcountfeature.h +++ b/searchlib/src/vespa/searchlib/features/matchcountfeature.h @@ -18,7 +18,7 @@ private: std::vector _handles; const fef::MatchData *_md; - virtual void handle_bind_match_data(fef::MatchData &md) override; + virtual void handle_bind_match_data(const fef::MatchData &md) override; public: MatchCountExecutor(uint32_t fieldId, const fef::IQueryEnvironment &env); diff --git a/searchlib/src/vespa/searchlib/features/matchesfeature.cpp b/searchlib/src/vespa/searchlib/features/matchesfeature.cpp index c2e36551648..f4788ee74c8 100644 --- a/searchlib/src/vespa/searchlib/features/matchesfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/matchesfeature.cpp @@ -40,7 +40,7 @@ MatchesExecutor::execute(uint32_t docId) } void -MatchesExecutor::handle_bind_match_data(MatchData &md) +MatchesExecutor::handle_bind_match_data(const MatchData &md) { _md = &md; } diff --git a/searchlib/src/vespa/searchlib/features/matchesfeature.h b/searchlib/src/vespa/searchlib/features/matchesfeature.h index fe82929d2a7..c6366349dd9 100644 --- a/searchlib/src/vespa/searchlib/features/matchesfeature.h +++ b/searchlib/src/vespa/searchlib/features/matchesfeature.h @@ -18,7 +18,7 @@ private: std::vector _handles; const fef::MatchData *_md; - void handle_bind_match_data(fef::MatchData &md) override; + void handle_bind_match_data(const fef::MatchData &md) override; public: MatchesExecutor(uint32_t fieldId, 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 6986703eaf6..cb8136e8b7f 100644 --- a/searchlib/src/vespa/searchlib/features/native_dot_product_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/native_dot_product_feature.cpp @@ -35,7 +35,7 @@ NativeDotProductExecutor::execute(uint32_t docId) } void -NativeDotProductExecutor::handle_bind_match_data(fef::MatchData &md) +NativeDotProductExecutor::handle_bind_match_data(const fef::MatchData &md) { _md = &md; } 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 cc29ecd5e6b..a71d23f3158 100644 --- a/searchlib/src/vespa/searchlib/features/native_dot_product_feature.h +++ b/searchlib/src/vespa/searchlib/features/native_dot_product_feature.h @@ -17,7 +17,7 @@ private: std::vector _pairs; const fef::MatchData *_md; - void handle_bind_match_data(fef::MatchData &md) override; + void handle_bind_match_data(const fef::MatchData &md) override; public: NativeDotProductExecutor(const fef::IQueryEnvironment &env, uint32_t fieldId); diff --git a/searchlib/src/vespa/searchlib/features/nativeattributematchfeature.cpp b/searchlib/src/vespa/searchlib/features/nativeattributematchfeature.cpp index 4243bb83e03..1e6423f9de8 100644 --- a/searchlib/src/vespa/searchlib/features/nativeattributematchfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/nativeattributematchfeature.cpp @@ -73,7 +73,7 @@ NativeAttributeMatchExecutorMulti::execute(uint32_t docId) } void -NativeAttributeMatchExecutorMulti::handle_bind_match_data(MatchData &md) +NativeAttributeMatchExecutorMulti::handle_bind_match_data(const MatchData &md) { _md = &md; } @@ -88,7 +88,7 @@ NativeAttributeMatchExecutorSingle::execute(uint32_t docId) } void -NativeAttributeMatchExecutorSingle::handle_bind_match_data(MatchData &md) +NativeAttributeMatchExecutorSingle::handle_bind_match_data(const MatchData &md) { _md = &md; } diff --git a/searchlib/src/vespa/searchlib/features/nativeattributematchfeature.h b/searchlib/src/vespa/searchlib/features/nativeattributematchfeature.h index 4ebdc871bb5..e47cbed0344 100644 --- a/searchlib/src/vespa/searchlib/features/nativeattributematchfeature.h +++ b/searchlib/src/vespa/searchlib/features/nativeattributematchfeature.h @@ -57,7 +57,7 @@ private: std::vector _queryTermData; const fef::MatchData *_md; - void handle_bind_match_data(fef::MatchData &md) override; + void handle_bind_match_data(const fef::MatchData &md) override; public: NativeAttributeMatchExecutorMulti(const Precomputed & setup) : _divisor(setup.second), _queryTermData(setup.first), _md(nullptr) { } void execute(uint32_t docId) override; @@ -69,7 +69,7 @@ private: CachedTermData _queryTermData; const fef::MatchData *_md; - void handle_bind_match_data(fef::MatchData &md) override; + void handle_bind_match_data(const fef::MatchData &md) override; public: NativeAttributeMatchExecutorSingle(const Precomputed & setup) : diff --git a/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.cpp b/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.cpp index e4b633d54dd..84ad17e1cb0 100644 --- a/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.cpp @@ -83,7 +83,7 @@ NativeFieldMatchExecutor::execute(uint32_t docId) } void -NativeFieldMatchExecutor::handle_bind_match_data(fef::MatchData &md) +NativeFieldMatchExecutor::handle_bind_match_data(const fef::MatchData &md) { _md = &md; } diff --git a/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.h b/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.h index d47dece1654..cb676e5b775 100644 --- a/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.h +++ b/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.h @@ -73,7 +73,7 @@ private: return table->get(index); } - virtual void handle_bind_match_data(fef::MatchData &md) override; + virtual void handle_bind_match_data(const fef::MatchData &md) override; public: NativeFieldMatchExecutor(const fef::IQueryEnvironment & env, diff --git a/searchlib/src/vespa/searchlib/features/nativeproximityfeature.cpp b/searchlib/src/vespa/searchlib/features/nativeproximityfeature.cpp index 3c92db6b937..a31d9207e05 100644 --- a/searchlib/src/vespa/searchlib/features/nativeproximityfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/nativeproximityfeature.cpp @@ -97,7 +97,7 @@ NativeProximityExecutor::execute(uint32_t docId) } void -NativeProximityExecutor::handle_bind_match_data(fef::MatchData &md) +NativeProximityExecutor::handle_bind_match_data(const fef::MatchData &md) { _md = &md; } diff --git a/searchlib/src/vespa/searchlib/features/nativeproximityfeature.h b/searchlib/src/vespa/searchlib/features/nativeproximityfeature.h index cda6776d42e..f98fe2bfd22 100644 --- a/searchlib/src/vespa/searchlib/features/nativeproximityfeature.h +++ b/searchlib/src/vespa/searchlib/features/nativeproximityfeature.h @@ -62,7 +62,7 @@ private: feature_t calculateScoreForField(const FieldSetup & fs, uint32_t docId); feature_t calculateScoreForPair(const TermPair & pair, uint32_t fieldId, uint32_t docId); - virtual void handle_bind_match_data(fef::MatchData &md) override; + virtual void handle_bind_match_data(const fef::MatchData &md) override; public: NativeProximityExecutor(const fef::IQueryEnvironment & env, const NativeProximityParams & params); diff --git a/searchlib/src/vespa/searchlib/features/proximityfeature.cpp b/searchlib/src/vespa/searchlib/features/proximityfeature.cpp index e6303ace100..f625e30f378 100644 --- a/searchlib/src/vespa/searchlib/features/proximityfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/proximityfeature.cpp @@ -51,7 +51,7 @@ ProximityExecutor::execute(uint32_t docId) } void -ProximityExecutor::handle_bind_match_data(fef::MatchData &md) +ProximityExecutor::handle_bind_match_data(const fef::MatchData &md) { _md = &md; } diff --git a/searchlib/src/vespa/searchlib/features/proximityfeature.h b/searchlib/src/vespa/searchlib/features/proximityfeature.h index 5a46bafe869..14a80628004 100644 --- a/searchlib/src/vespa/searchlib/features/proximityfeature.h +++ b/searchlib/src/vespa/searchlib/features/proximityfeature.h @@ -41,7 +41,7 @@ private: bool findBest(const fef::TermFieldMatchData &matchA, const fef::TermFieldMatchData &matchB); - void handle_bind_match_data(fef::MatchData &md) override; + void handle_bind_match_data(const fef::MatchData &md) override; }; /** diff --git a/searchlib/src/vespa/searchlib/features/querycompletenessfeature.cpp b/searchlib/src/vespa/searchlib/features/querycompletenessfeature.cpp index af44f75e33f..b4b6a1b0eb4 100644 --- a/searchlib/src/vespa/searchlib/features/querycompletenessfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/querycompletenessfeature.cpp @@ -62,7 +62,7 @@ QueryCompletenessExecutor::execute(uint32_t docId) } void -QueryCompletenessExecutor::handle_bind_match_data(fef::MatchData &md) +QueryCompletenessExecutor::handle_bind_match_data(const fef::MatchData &md) { _md = &md; } diff --git a/searchlib/src/vespa/searchlib/features/querycompletenessfeature.h b/searchlib/src/vespa/searchlib/features/querycompletenessfeature.h index 5e30563f6ec..a5e6bbdc2bb 100644 --- a/searchlib/src/vespa/searchlib/features/querycompletenessfeature.h +++ b/searchlib/src/vespa/searchlib/features/querycompletenessfeature.h @@ -38,7 +38,7 @@ private: std::vector _fieldHandles; const fef::MatchData *_md; - void handle_bind_match_data(fef::MatchData &md) override; + void handle_bind_match_data(const fef::MatchData &md) override; }; /** diff --git a/searchlib/src/vespa/searchlib/features/raw_score_feature.cpp b/searchlib/src/vespa/searchlib/features/raw_score_feature.cpp index 2fa59111d00..02e44e781d4 100644 --- a/searchlib/src/vespa/searchlib/features/raw_score_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/raw_score_feature.cpp @@ -35,7 +35,7 @@ RawScoreExecutor::execute(uint32_t docId) } void -RawScoreExecutor::handle_bind_match_data(fef::MatchData &md) +RawScoreExecutor::handle_bind_match_data(const fef::MatchData &md) { _md = &md; } diff --git a/searchlib/src/vespa/searchlib/features/raw_score_feature.h b/searchlib/src/vespa/searchlib/features/raw_score_feature.h index 8bb310fa18e..0eceba16ffe 100644 --- a/searchlib/src/vespa/searchlib/features/raw_score_feature.h +++ b/searchlib/src/vespa/searchlib/features/raw_score_feature.h @@ -14,7 +14,7 @@ private: std::vector _handles; const fef::MatchData *_md; - void handle_bind_match_data(fef::MatchData &md) override; + void handle_bind_match_data(const fef::MatchData &md) override; public: RawScoreExecutor(const fef::IQueryEnvironment &env, uint32_t fieldId); void execute(uint32_t docId) override; diff --git a/searchlib/src/vespa/searchlib/features/reverseproximityfeature.cpp b/searchlib/src/vespa/searchlib/features/reverseproximityfeature.cpp index 0f35e1becf8..c27936332d2 100644 --- a/searchlib/src/vespa/searchlib/features/reverseproximityfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/reverseproximityfeature.cpp @@ -90,7 +90,7 @@ ReverseProximityExecutor::execute(uint32_t docId) } void -ReverseProximityExecutor::handle_bind_match_data(fef::MatchData &md) +ReverseProximityExecutor::handle_bind_match_data(const fef::MatchData &md) { _md = &md; } diff --git a/searchlib/src/vespa/searchlib/features/reverseproximityfeature.h b/searchlib/src/vespa/searchlib/features/reverseproximityfeature.h index c16448435f2..776dde39f77 100644 --- a/searchlib/src/vespa/searchlib/features/reverseproximityfeature.h +++ b/searchlib/src/vespa/searchlib/features/reverseproximityfeature.h @@ -39,7 +39,7 @@ private: fef::TermFieldHandle _termB; // Handle to the second query term. const fef::MatchData *_md; - void handle_bind_match_data(fef::MatchData &md) override; + void handle_bind_match_data(const fef::MatchData &md) override; }; /** diff --git a/searchlib/src/vespa/searchlib/features/subqueries_feature.cpp b/searchlib/src/vespa/searchlib/features/subqueries_feature.cpp index 4bbb7af9dfb..6c52b6edb76 100644 --- a/searchlib/src/vespa/searchlib/features/subqueries_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/subqueries_feature.cpp @@ -37,7 +37,7 @@ void SubqueriesExecutor::execute(uint32_t docId) { } void -SubqueriesExecutor::handle_bind_match_data(fef::MatchData &md) +SubqueriesExecutor::handle_bind_match_data(const fef::MatchData &md) { _md = &md; } diff --git a/searchlib/src/vespa/searchlib/features/subqueries_feature.h b/searchlib/src/vespa/searchlib/features/subqueries_feature.h index 60bec51cb79..136d8d90f94 100644 --- a/searchlib/src/vespa/searchlib/features/subqueries_feature.h +++ b/searchlib/src/vespa/searchlib/features/subqueries_feature.h @@ -12,7 +12,7 @@ class SubqueriesExecutor : public fef::FeatureExecutor { std::vector _handles; const fef::MatchData *_md; - void handle_bind_match_data(fef::MatchData &md) override; + void handle_bind_match_data(const fef::MatchData &md) override; public: SubqueriesExecutor(const fef::IQueryEnvironment &env, uint32_t fieldId); void execute(uint32_t docId) override; diff --git a/searchlib/src/vespa/searchlib/features/term_field_md_feature.cpp b/searchlib/src/vespa/searchlib/features/term_field_md_feature.cpp index 97d267071cf..8b0eecd9cff 100644 --- a/searchlib/src/vespa/searchlib/features/term_field_md_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/term_field_md_feature.cpp @@ -65,7 +65,7 @@ TermFieldMdExecutor::execute(uint32_t docId) } void -TermFieldMdExecutor::handle_bind_match_data(MatchData &md) +TermFieldMdExecutor::handle_bind_match_data(const MatchData &md) { _md = &md; } diff --git a/searchlib/src/vespa/searchlib/features/term_field_md_feature.h b/searchlib/src/vespa/searchlib/features/term_field_md_feature.h index f819989fc08..df9ab982dcb 100644 --- a/searchlib/src/vespa/searchlib/features/term_field_md_feature.h +++ b/searchlib/src/vespa/searchlib/features/term_field_md_feature.h @@ -21,7 +21,7 @@ class TermFieldMdExecutor : public fef::FeatureExecutor { const fef::MatchData *_md; void execute(uint32_t docId) override; - void handle_bind_match_data(fef::MatchData &md) override; + void handle_bind_match_data(const fef::MatchData &md) override; public: TermFieldMdExecutor(const fef::IQueryEnvironment &env, uint32_t fieldId); }; diff --git a/searchlib/src/vespa/searchlib/features/termdistancefeature.cpp b/searchlib/src/vespa/searchlib/features/termdistancefeature.cpp index a67c6a0be7c..0408f6d4b75 100644 --- a/searchlib/src/vespa/searchlib/features/termdistancefeature.cpp +++ b/searchlib/src/vespa/searchlib/features/termdistancefeature.cpp @@ -42,7 +42,7 @@ TermDistanceExecutor::execute(uint32_t docId) } void -TermDistanceExecutor::handle_bind_match_data(fef::MatchData &md) +TermDistanceExecutor::handle_bind_match_data(const fef::MatchData &md) { _md = &md; } diff --git a/searchlib/src/vespa/searchlib/features/termdistancefeature.h b/searchlib/src/vespa/searchlib/features/termdistancefeature.h index 5c4542a1f0d..8e153072bc2 100644 --- a/searchlib/src/vespa/searchlib/features/termdistancefeature.h +++ b/searchlib/src/vespa/searchlib/features/termdistancefeature.h @@ -31,7 +31,7 @@ private: QueryTerm _termB; const fef::MatchData *_md; - virtual void handle_bind_match_data(fef::MatchData &md) override; + virtual void handle_bind_match_data(const fef::MatchData &md) override; public: TermDistanceExecutor(const fef::IQueryEnvironment & env, diff --git a/searchlib/src/vespa/searchlib/features/termeditdistancefeature.cpp b/searchlib/src/vespa/searchlib/features/termeditdistancefeature.cpp index 05bdbb4475b..5990d62cb25 100644 --- a/searchlib/src/vespa/searchlib/features/termeditdistancefeature.cpp +++ b/searchlib/src/vespa/searchlib/features/termeditdistancefeature.cpp @@ -156,7 +156,7 @@ TermEditDistanceExecutor::execute(uint32_t docId) } void -TermEditDistanceExecutor::handle_bind_match_data(fef::MatchData &md) +TermEditDistanceExecutor::handle_bind_match_data(const fef::MatchData &md) { _md = &md; } diff --git a/searchlib/src/vespa/searchlib/features/termeditdistancefeature.h b/searchlib/src/vespa/searchlib/features/termeditdistancefeature.h index 07d625726e0..ea5974495ea 100644 --- a/searchlib/src/vespa/searchlib/features/termeditdistancefeature.h +++ b/searchlib/src/vespa/searchlib/features/termeditdistancefeature.h @@ -88,7 +88,7 @@ private: */ void logRow(const std::vector &row, size_t numCols); - void handle_bind_match_data(fef::MatchData &md) override; + void handle_bind_match_data(const fef::MatchData &md) override; private: const TermEditDistanceConfig &_config; // The config for this executor. diff --git a/searchlib/src/vespa/searchlib/features/text_similarity_feature.cpp b/searchlib/src/vespa/searchlib/features/text_similarity_feature.cpp index 31876e4f1c9..a50f042b552 100644 --- a/searchlib/src/vespa/searchlib/features/text_similarity_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/text_similarity_feature.cpp @@ -158,7 +158,7 @@ TextSimilarityExecutor::execute(uint32_t docId) } void -TextSimilarityExecutor::handle_bind_match_data(fef::MatchData &md) +TextSimilarityExecutor::handle_bind_match_data(const fef::MatchData &md) { _md = &md; } diff --git a/searchlib/src/vespa/searchlib/features/text_similarity_feature.h b/searchlib/src/vespa/searchlib/features/text_similarity_feature.h index e948589fc97..a660f3e3e30 100644 --- a/searchlib/src/vespa/searchlib/features/text_similarity_feature.h +++ b/searchlib/src/vespa/searchlib/features/text_similarity_feature.h @@ -35,7 +35,7 @@ private: vespalib::PriorityQueue _queue; const fef::MatchData *_md; - void handle_bind_match_data(fef::MatchData &md) override; + void handle_bind_match_data(const fef::MatchData &md) override; public: TextSimilarityExecutor(const fef::IQueryEnvironment &env, uint32_t field_id); diff --git a/searchlib/src/vespa/searchlib/fef/featureexecutor.cpp b/searchlib/src/vespa/searchlib/fef/featureexecutor.cpp index f8268d66e47..02d69fbc5ca 100644 --- a/searchlib/src/vespa/searchlib/fef/featureexecutor.cpp +++ b/searchlib/src/vespa/searchlib/fef/featureexecutor.cpp @@ -28,7 +28,7 @@ FeatureExecutor::handle_bind_outputs(vespalib::ArrayRef) } void -FeatureExecutor::handle_bind_match_data(MatchData &) +FeatureExecutor::handle_bind_match_data(const MatchData &) { } @@ -47,7 +47,7 @@ FeatureExecutor::bind_outputs(vespalib::ArrayRef outputs) } void -FeatureExecutor::bind_match_data(MatchData &md) +FeatureExecutor::bind_match_data(const MatchData &md) { handle_bind_match_data(md); } diff --git a/searchlib/src/vespa/searchlib/fef/featureexecutor.h b/searchlib/src/vespa/searchlib/fef/featureexecutor.h index 1d8e4bff0c4..c8219fada3b 100644 --- a/searchlib/src/vespa/searchlib/fef/featureexecutor.h +++ b/searchlib/src/vespa/searchlib/fef/featureexecutor.h @@ -98,7 +98,7 @@ private: protected: virtual void handle_bind_inputs(vespalib::ConstArrayRef inputs); virtual void handle_bind_outputs(vespalib::ArrayRef outputs); - virtual void handle_bind_match_data(MatchData &md); + virtual void handle_bind_match_data(const MatchData &md); /** * Execute this feature executor for the given document. @@ -117,7 +117,7 @@ public: // bind order per executor: inputs, outputs, match_data void bind_inputs(vespalib::ConstArrayRef inputs); void bind_outputs(vespalib::ArrayRef outputs); - void bind_match_data(MatchData &md); + void bind_match_data(const MatchData &md); const Inputs &inputs() const { return _inputs; } const Outputs &outputs() const { return _outputs; } diff --git a/searchlib/src/vespa/searchlib/fef/featureoverrider.cpp b/searchlib/src/vespa/searchlib/fef/featureoverrider.cpp index ad623c65c07..5209065fd62 100644 --- a/searchlib/src/vespa/searchlib/fef/featureoverrider.cpp +++ b/searchlib/src/vespa/searchlib/fef/featureoverrider.cpp @@ -40,7 +40,7 @@ FeatureOverrider::execute(uint32_t docId) } void -FeatureOverrider::handle_bind_match_data(MatchData &md) +FeatureOverrider::handle_bind_match_data(const MatchData &md) { _executor.bind_match_data(md); } diff --git a/searchlib/src/vespa/searchlib/fef/featureoverrider.h b/searchlib/src/vespa/searchlib/fef/featureoverrider.h index 3f2075ffbcb..89c397abfdb 100644 --- a/searchlib/src/vespa/searchlib/fef/featureoverrider.h +++ b/searchlib/src/vespa/searchlib/fef/featureoverrider.h @@ -24,7 +24,7 @@ private: uint32_t _outputIdx; feature_t _value; - virtual void handle_bind_match_data(MatchData &md) override; + virtual void handle_bind_match_data(const MatchData &md) override; virtual void handle_bind_inputs(vespalib::ConstArrayRef inputs) override; virtual void handle_bind_outputs(vespalib::ArrayRef outputs) override; -- cgit v1.2.3