diff options
Diffstat (limited to 'searchlib')
108 files changed, 218 insertions, 200 deletions
diff --git a/searchlib/src/tests/fef/featureoverride/featureoverride.cpp b/searchlib/src/tests/fef/featureoverride/featureoverride.cpp index 1e7cd3b6919..fe52de4bded 100644 --- a/searchlib/src/tests/fef/featureoverride/featureoverride.cpp +++ b/searchlib/src/tests/fef/featureoverride/featureoverride.cpp @@ -38,7 +38,7 @@ struct Fixture md = mdl.createMatchData(); for (const auto &executor : executors) { executor->bind_match_data(*md); - executor->execute(*md); + executor->execute(0); } return *this; } diff --git a/searchlib/src/tests/fef/object_passing/object_passing_test.cpp b/searchlib/src/tests/fef/object_passing/object_passing_test.cpp index 48ed37c99f2..4e7a39f994e 100644 --- a/searchlib/src/tests/fef/object_passing/object_passing_test.cpp +++ b/searchlib/src/tests/fef/object_passing/object_passing_test.cpp @@ -26,7 +26,7 @@ struct ProxyExecutor : FeatureExecutor { : input_is_object(input_is_object_in), output_is_object(output_is_object_in), number_value(0.0), object_value() {} bool isPure() override { return true; } - void execute(search::fef::MatchData &) override { + void execute(uint32_t) override { double was_object = 0.0; if (input_is_object) { was_object = 1.0; diff --git a/searchlib/src/tests/fef/rank_program/rank_program_test.cpp b/searchlib/src/tests/fef/rank_program/rank_program_test.cpp index 9be98a944c6..b6da6f9f5e3 100644 --- a/searchlib/src/tests/fef/rank_program/rank_program_test.cpp +++ b/searchlib/src/tests/fef/rank_program/rank_program_test.cpp @@ -32,7 +32,7 @@ struct ImpureValueExecutor : FeatureExecutor { double value; ImpureValueExecutor(double value_in) : value(value_in) {} bool isPure() override { return false; } - void execute(search::fef::MatchData &) override { outputs().set_number(0, value); } + void execute(uint32_t) override { outputs().set_number(0, value); } }; struct ImpureValueBlueprint : Blueprint { diff --git a/searchlib/src/vespa/searchlib/features/agefeature.cpp b/searchlib/src/vespa/searchlib/features/agefeature.cpp index 90c8b42465e..f425b13ac34 100644 --- a/searchlib/src/vespa/searchlib/features/agefeature.cpp +++ b/searchlib/src/vespa/searchlib/features/agefeature.cpp @@ -27,11 +27,11 @@ AgeExecutor::AgeExecutor(const IAttributeVector *attribute) : } void -AgeExecutor::execute(search::fef::MatchData &data) +AgeExecutor::execute(uint32_t docId) { feature_t age = 10000000000.0; if (_attribute != NULL) { - _buf.fill(*_attribute, data.getDocId()); + _buf.fill(*_attribute, docId); int64_t docTime = _buf[0]; feature_t currTime = inputs().get_number(0); age = currTime - docTime; diff --git a/searchlib/src/vespa/searchlib/features/agefeature.h b/searchlib/src/vespa/searchlib/features/agefeature.h index 8b729e5bf14..cb4827b9539 100644 --- a/searchlib/src/vespa/searchlib/features/agefeature.h +++ b/searchlib/src/vespa/searchlib/features/agefeature.h @@ -25,7 +25,7 @@ public: * Constructs a new executor. **/ AgeExecutor(const search::attribute::IAttributeVector *attribute); - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; /** diff --git a/searchlib/src/vespa/searchlib/features/attributefeature.cpp b/searchlib/src/vespa/searchlib/features/attributefeature.cpp index f36245fcb6a..a07552bdeb8 100644 --- a/searchlib/src/vespa/searchlib/features/attributefeature.cpp +++ b/searchlib/src/vespa/searchlib/features/attributefeature.cpp @@ -119,7 +119,7 @@ public: SingleAttributeExecutor(const T & attribute) : _attribute(attribute) { } // Inherit doc from FeatureExecutor. - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; class CountOnlyAttributeExecutor : public fef::FeatureExecutor { @@ -135,7 +135,7 @@ public: CountOnlyAttributeExecutor(const attribute::IAttributeVector & attribute) : _attribute(attribute) { } // Inherit doc from FeatureExecutor. - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; /** * Implements the executor for fetching values from a single or array attribute vector @@ -159,7 +159,7 @@ public: AttributeExecutor(const search::attribute::IAttributeVector * attribute, uint32_t idx); // Inherit doc from FeatureExecutor. - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; @@ -186,14 +186,14 @@ public: WeightedSetAttributeExecutor(const search::attribute::IAttributeVector * attribute, T key, bool useKey); // Inherit doc from FeatureExecutor. - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; template <typename T> void -SingleAttributeExecutor<T>::execute(search::fef::MatchData & match) +SingleAttributeExecutor<T>::execute(uint32_t docId) { - typename T::LoadedValueType v = _attribute.getFast(match.getDocId()); + typename T::LoadedValueType v = _attribute.getFast(docId); // value outputs().set_number(0, __builtin_expect(attribute::isUndefined(v), false) ? attribute::getUndefined<search::feature_t>() @@ -204,12 +204,12 @@ SingleAttributeExecutor<T>::execute(search::fef::MatchData & match) } void -CountOnlyAttributeExecutor::execute(search::fef::MatchData & match) +CountOnlyAttributeExecutor::execute(uint32_t docId) { outputs().set_number(0, 0.0f); // value outputs().set_number(1, 0.0f); // weight outputs().set_number(2, 0.0f); // contains - outputs().set_number(3, _attribute.getValueCount(match.getDocId())); // count + outputs().set_number(3, _attribute.getValueCount(docId)); // count } template <typename T> @@ -226,10 +226,10 @@ AttributeExecutor<T>::AttributeExecutor(const IAttributeVector * attribute, uint template <typename T> void -AttributeExecutor<T>::execute(search::fef::MatchData & match) +AttributeExecutor<T>::execute(uint32_t docId) { feature_t value = 0.0f; - _buffer.fill(*_attribute, match.getDocId()); + _buffer.fill(*_attribute, docId); if (_idx < _buffer.size()) { value = considerUndefined(_buffer[_idx], _attrType); } @@ -253,14 +253,14 @@ WeightedSetAttributeExecutor<BT, T>::WeightedSetAttributeExecutor(const IAttribu template <typename BT, typename T> void -WeightedSetAttributeExecutor<BT, T>::execute(search::fef::MatchData & match) +WeightedSetAttributeExecutor<BT, T>::execute(uint32_t docId) { feature_t value = 0.0f; feature_t weight = 0.0f; feature_t contains = 0.0f; feature_t count = 0.0f; if (_useKey) { - _buffer.fill(*_attribute, match.getDocId()); + _buffer.fill(*_attribute, docId); for (uint32_t i = 0; i < _buffer.size(); ++i) { if (equals(_buffer[i].getValue(), _key)) { value = considerUndefined(_key, _attrType); @@ -270,7 +270,7 @@ WeightedSetAttributeExecutor<BT, T>::execute(search::fef::MatchData & match) } } } else { - count = _attribute->getValueCount(match.getDocId()); + count = _attribute->getValueCount(docId); } outputs().set_number(0, value); // value outputs().set_number(1, weight); // weight diff --git a/searchlib/src/vespa/searchlib/features/attributematchfeature.cpp b/searchlib/src/vespa/searchlib/features/attributematchfeature.cpp index 86ba6099bea..7622f0765ff 100644 --- a/searchlib/src/vespa/searchlib/features/attributematchfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/attributematchfeature.cpp @@ -96,13 +96,13 @@ AttributeMatchExecutor<T>::Computer::reset() template <typename T> void -AttributeMatchExecutor<T>::Computer::run(MatchData & match) +AttributeMatchExecutor<T>::Computer::run(uint32_t docId) { for (size_t i = 0; i < _queryTerms.size(); ++i) { const ITermData * td = _queryTerms[i].termData(); feature_t significance = _queryTerms[i].significance(); const TermFieldMatchData *tfmd = _md->resolveTermField(_queryTerms[i].fieldHandle()); - if (tfmd->getDocId() == match.getDocId()) { // hit on this document + if (tfmd->getDocId() == docId) { // hit on this document _matches++; _matchedTermWeight += td->getWeight().percent(); _matchedTermSignificance += significance; @@ -115,12 +115,12 @@ AttributeMatchExecutor<T>::Computer::run(MatchData & match) } } if (_params.weightedSet) { - _buffer.fill(*_params.attribute, match.getDocId()); + _buffer.fill(*_params.attribute, docId); for (uint32_t i = 0; i < _buffer.size(); ++i) { _weightSum += _buffer[i].getWeight(); } } else { - _valueCount = _params.attribute->getValueCount(match.getDocId()); + _valueCount = _params.attribute->getValueCount(docId); } LOG(debug, "attributeMatch(%s)::Computer::run(): matches(%u), totalWeight(%d), normalizedWeightedWeight(%f), " @@ -233,11 +233,11 @@ AttributeMatchExecutor<T>::AttributeMatchExecutor(const IQueryEnvironment & env, template <typename T> void -AttributeMatchExecutor<T>::execute(MatchData & match) +AttributeMatchExecutor<T>::execute(uint32_t docId) { //LOG(debug, "Execute for field '%s':", _params.attrInfo->name().c_str()); _cmp.reset(); - _cmp.run(match); + _cmp.run(docId); outputs().set_number(0, _cmp.getCompleteness()); outputs().set_number(1, _cmp.getQueryCompleteness()); diff --git a/searchlib/src/vespa/searchlib/features/attributematchfeature.h b/searchlib/src/vespa/searchlib/features/attributematchfeature.h index d023c16abd1..284c5acb674 100644 --- a/searchlib/src/vespa/searchlib/features/attributematchfeature.h +++ b/searchlib/src/vespa/searchlib/features/attributematchfeature.h @@ -56,7 +56,7 @@ private: public: Computer(const search::fef::IQueryEnvironment & env, AttributeMatchParams params); - void run(search::fef::MatchData & data); + void run(uint32_t docId); void reset(); uint32_t getNumTerms() const { return _queryTerms.size(); } uint32_t getMatches() const { return _matches; } @@ -85,7 +85,7 @@ public: AttributeMatchParams params); // Inherit doc from FeatureExecutor. - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; diff --git a/searchlib/src/vespa/searchlib/features/closenessfeature.cpp b/searchlib/src/vespa/searchlib/features/closenessfeature.cpp index 2007c178e53..eb1a5c646c0 100644 --- a/searchlib/src/vespa/searchlib/features/closenessfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/closenessfeature.cpp @@ -20,7 +20,7 @@ ClosenessExecutor::ClosenessExecutor(feature_t maxDistance, feature_t scaleDista } void -ClosenessExecutor::execute(MatchData &) +ClosenessExecutor::execute(uint32_t) { feature_t distance = inputs().get_number(0); feature_t closeness = std::max(1 - (distance / _maxDistance), (feature_t)0); diff --git a/searchlib/src/vespa/searchlib/features/closenessfeature.h b/searchlib/src/vespa/searchlib/features/closenessfeature.h index 3def80c66fc..b46c40d4619 100644 --- a/searchlib/src/vespa/searchlib/features/closenessfeature.h +++ b/searchlib/src/vespa/searchlib/features/closenessfeature.h @@ -22,7 +22,7 @@ public: * Constructs an executor. */ ClosenessExecutor(feature_t maxDistance, feature_t scaleDistance); - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; diff --git a/searchlib/src/vespa/searchlib/features/constant_feature.cpp b/searchlib/src/vespa/searchlib/features/constant_feature.cpp index 51a2904da0b..99414f8af86 100644 --- a/searchlib/src/vespa/searchlib/features/constant_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/constant_feature.cpp @@ -27,7 +27,7 @@ public: : _value(value) {} virtual bool isPure() override { return true; } - virtual void execute(fef::MatchData &) override { + virtual void execute(uint32_t) override { outputs().set_object(0, _value); } static FeatureExecutor &create(const vespalib::eval::Value &value, vespalib::Stash &stash) { diff --git a/searchlib/src/vespa/searchlib/features/constant_tensor_executor.h b/searchlib/src/vespa/searchlib/features/constant_tensor_executor.h index b94e1884137..07b4abd53b0 100644 --- a/searchlib/src/vespa/searchlib/features/constant_tensor_executor.h +++ b/searchlib/src/vespa/searchlib/features/constant_tensor_executor.h @@ -25,7 +25,7 @@ public: : _tensor(std::move(tensor)) {} virtual bool isPure() override { return true; } - virtual void execute(fef::MatchData &) override { + virtual void execute(uint32_t) override { outputs().set_object(0, *_tensor); } static fef::FeatureExecutor &create(std::unique_ptr<vespalib::eval::Tensor> tensor, vespalib::Stash &stash) { diff --git a/searchlib/src/vespa/searchlib/features/debug_attribute_wait.cpp b/searchlib/src/vespa/searchlib/features/debug_attribute_wait.cpp index 7f76628a617..615fd06c987 100644 --- a/searchlib/src/vespa/searchlib/features/debug_attribute_wait.cpp +++ b/searchlib/src/vespa/searchlib/features/debug_attribute_wait.cpp @@ -26,7 +26,7 @@ public: DebugAttributeWaitExecutor(const IQueryEnvironment &env, const IAttributeVector * attribute, const DebugAttributeWaitParams ¶ms); - void execute(MatchData & data) override; + void execute(uint32_t docId) override; }; DebugAttributeWaitExecutor::DebugAttributeWaitExecutor(const IQueryEnvironment &env, @@ -40,14 +40,14 @@ DebugAttributeWaitExecutor::DebugAttributeWaitExecutor(const IQueryEnvironment & } void -DebugAttributeWaitExecutor::execute(MatchData &data) +DebugAttributeWaitExecutor::execute(uint32_t docId) { double waitTime = 0.0; FastOS_Time time; time.SetNow(); if (_attribute != NULL) { - _buf.fill(*_attribute, data.getDocId()); + _buf.fill(*_attribute, docId); waitTime = _buf[0]; } double millis = waitTime * 1000.0; diff --git a/searchlib/src/vespa/searchlib/features/debug_wait.cpp b/searchlib/src/vespa/searchlib/features/debug_wait.cpp index 2b70bdc5497..395a4c11d61 100644 --- a/searchlib/src/vespa/searchlib/features/debug_wait.cpp +++ b/searchlib/src/vespa/searchlib/features/debug_wait.cpp @@ -20,7 +20,7 @@ private: public: DebugWaitExecutor(const IQueryEnvironment &env, const DebugWaitParams ¶ms); - void execute(MatchData & data) override; + void execute(uint32_t docId) override; }; DebugWaitExecutor::DebugWaitExecutor(const IQueryEnvironment &env, const DebugWaitParams ¶ms) @@ -30,7 +30,7 @@ DebugWaitExecutor::DebugWaitExecutor(const IQueryEnvironment &env, const DebugWa } void -DebugWaitExecutor::execute(MatchData &) +DebugWaitExecutor::execute(uint32_t) { FastOS_Time time; time.SetNow(); diff --git a/searchlib/src/vespa/searchlib/features/dense_tensor_attribute_executor.cpp b/searchlib/src/vespa/searchlib/features/dense_tensor_attribute_executor.cpp index 93a88fc4c2d..e7515727b23 100644 --- a/searchlib/src/vespa/searchlib/features/dense_tensor_attribute_executor.cpp +++ b/searchlib/src/vespa/searchlib/features/dense_tensor_attribute_executor.cpp @@ -21,9 +21,9 @@ DenseTensorAttributeExecutor(const DenseTensorAttribute *attribute) } void -DenseTensorAttributeExecutor::execute(fef::MatchData &data) +DenseTensorAttributeExecutor::execute(uint32_t docId) { - _attribute->getTensor(data.getDocId(), _tensorView); + _attribute->getTensor(docId, _tensorView); outputs().set_object(0, _tensor); } diff --git a/searchlib/src/vespa/searchlib/features/dense_tensor_attribute_executor.h b/searchlib/src/vespa/searchlib/features/dense_tensor_attribute_executor.h index 7c2d856e784..39aa0ea9922 100644 --- a/searchlib/src/vespa/searchlib/features/dense_tensor_attribute_executor.h +++ b/searchlib/src/vespa/searchlib/features/dense_tensor_attribute_executor.h @@ -23,7 +23,7 @@ private: public: DenseTensorAttributeExecutor(const search::tensor::DenseTensorAttribute *attribute); - virtual void execute(fef::MatchData &data); + virtual void execute(uint32_t docId); }; } // namespace features diff --git a/searchlib/src/vespa/searchlib/features/distancefeature.cpp b/searchlib/src/vespa/searchlib/features/distancefeature.cpp index f60543ce054..77dcffbf70c 100644 --- a/searchlib/src/vespa/searchlib/features/distancefeature.cpp +++ b/searchlib/src/vespa/searchlib/features/distancefeature.cpp @@ -72,9 +72,9 @@ DistanceExecutor::DistanceExecutor(const Location & location, } void -DistanceExecutor::execute(MatchData & match) +DistanceExecutor::execute(uint32_t docId) { - outputs().set_number(0, calculateDistance(match.getDocId())); + outputs().set_number(0, calculateDistance(docId)); } const feature_t DistanceExecutor::DEFAULT_DISTANCE(6400000000.0); diff --git a/searchlib/src/vespa/searchlib/features/distancefeature.h b/searchlib/src/vespa/searchlib/features/distancefeature.h index dd03eddfa9a..f56de5e6780 100644 --- a/searchlib/src/vespa/searchlib/features/distancefeature.h +++ b/searchlib/src/vespa/searchlib/features/distancefeature.h @@ -31,7 +31,7 @@ public: */ DistanceExecutor(const search::fef::Location & location, const search::attribute::IAttributeVector * pos); - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); static const feature_t DEFAULT_DISTANCE; }; diff --git a/searchlib/src/vespa/searchlib/features/distancetopathfeature.cpp b/searchlib/src/vespa/searchlib/features/distancetopathfeature.cpp index a95901b0e61..a2940d775d9 100644 --- a/searchlib/src/vespa/searchlib/features/distancetopathfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/distancetopathfeature.cpp @@ -33,12 +33,12 @@ DistanceToPathExecutor::DistanceToPathExecutor(std::vector<Vector2> &path, } void -DistanceToPathExecutor::execute(search::fef::MatchData & match) +DistanceToPathExecutor::execute(uint32_t docId) { if (_path.size() > 1 && _pos != NULL) { double pos = -1, trip = 0, product = 0; double minSqDist = std::numeric_limits<double>::max(); - _intBuf.fill(*_pos, match.getDocId()); + _intBuf.fill(*_pos, docId); // For each line segment, do for (uint32_t seg = 1; seg < _path.size(); ++seg) { diff --git a/searchlib/src/vespa/searchlib/features/distancetopathfeature.h b/searchlib/src/vespa/searchlib/features/distancetopathfeature.h index 457a10b4cd7..470f6c3ce2b 100644 --- a/searchlib/src/vespa/searchlib/features/distancetopathfeature.h +++ b/searchlib/src/vespa/searchlib/features/distancetopathfeature.h @@ -35,7 +35,7 @@ public: */ DistanceToPathExecutor(std::vector<Vector2> &path, const search::attribute::IAttributeVector *pos); - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); /** * Defines a default distance value to use if a proper one can not be determined. diff --git a/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp b/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp index b7e63c9b233..fafd1955a80 100644 --- a/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp @@ -36,11 +36,11 @@ DotProductExecutor<Vector, Buffer>::DotProductExecutor(const IAttributeVector * template <typename Vector, typename Buffer> void -DotProductExecutor<Vector, Buffer>::execute(MatchData & match) +DotProductExecutor<Vector, Buffer>::execute(uint32_t docId) { feature_t val = 0; if (!_vector.getDimMap().empty()) { - _buffer.fill(*_attribute, match.getDocId()); + _buffer.fill(*_attribute, docId); for (size_t i = 0; i < _buffer.size(); ++i) { typename Vector::HashMap::const_iterator itr = _vector.getDimMap().find(_buffer[i].getValue()); if (itr != _vector.getDimMap().end()) { @@ -73,10 +73,10 @@ DotProductExecutor<A>::getAttributeValues(uint32_t docId, const AT * & values) template <typename A> void -DotProductExecutor<A>::execute(MatchData & match) +DotProductExecutor<A>::execute(uint32_t docId) { const AT *values(NULL); - size_t count = getAttributeValues(match.getDocId(), values); + size_t count = getAttributeValues(docId, values); size_t commonRange = std::min(count, _vector.size()); outputs().set_number(0, _multiplier->dotProduct(&_vector[0], reinterpret_cast<const typename A::BaseType *>(values), commonRange)); } diff --git a/searchlib/src/vespa/searchlib/features/dotproductfeature.h b/searchlib/src/vespa/searchlib/features/dotproductfeature.h index 6cc425026ba..23cc8327b44 100644 --- a/searchlib/src/vespa/searchlib/features/dotproductfeature.h +++ b/searchlib/src/vespa/searchlib/features/dotproductfeature.h @@ -104,7 +104,7 @@ private: public: DotProductExecutor(const search::attribute::IAttributeVector * attribute, const Vector & vector); - virtual void execute(fef::MatchData & data); + virtual void execute(uint32_t docId); }; } @@ -127,7 +127,7 @@ private: virtual size_t getAttributeValues(uint32_t docid, const AT * & count); public: DotProductExecutor(const A * attribute, const V & vector); - virtual void execute(fef::MatchData & data); + virtual void execute(uint32_t docId); }; template <typename A> diff --git a/searchlib/src/vespa/searchlib/features/element_completeness_feature.cpp b/searchlib/src/vespa/searchlib/features/element_completeness_feature.cpp index 9d3a9d39bf1..0874afcb080 100644 --- a/searchlib/src/vespa/searchlib/features/element_completeness_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/element_completeness_feature.cpp @@ -35,12 +35,12 @@ ElementCompletenessExecutor::ElementCompletenessExecutor(const search::fef::IQue } void -ElementCompletenessExecutor::execute(search::fef::MatchData &data) +ElementCompletenessExecutor::execute(uint32_t docId) { assert(_queue.empty()); for (size_t i = 0; i < _terms.size(); ++i) { const search::fef::TermFieldMatchData *tfmd = _md->resolveTermField(_terms[i].termHandle); - if (tfmd->getDocId() == data.getDocId()) { + if (tfmd->getDocId() == docId) { Item item(i, tfmd->begin(), tfmd->end()); if (item.pos != item.end) { _queue.push(item); diff --git a/searchlib/src/vespa/searchlib/features/element_completeness_feature.h b/searchlib/src/vespa/searchlib/features/element_completeness_feature.h index ad631c0893f..11ca3da2d21 100644 --- a/searchlib/src/vespa/searchlib/features/element_completeness_feature.h +++ b/searchlib/src/vespa/searchlib/features/element_completeness_feature.h @@ -90,7 +90,7 @@ public: ElementCompletenessExecutor(const search::fef::IQueryEnvironment &env, const ElementCompletenessParams ¶ms); virtual bool isPure() { return _terms.empty(); } - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; //----------------------------------------------------------------------------- diff --git a/searchlib/src/vespa/searchlib/features/element_similarity_feature.cpp b/searchlib/src/vespa/searchlib/features/element_similarity_feature.cpp index b4d66967b93..0cf4ba591c6 100644 --- a/searchlib/src/vespa/searchlib/features/element_similarity_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/element_similarity_feature.cpp @@ -239,13 +239,13 @@ public: } } - virtual void execute(fef::MatchData &data) { + virtual void execute(uint32_t docId) { for (auto &output: _outputs) { output.second->clear(); } for (size_t i = 0; i < _terms.handles.size(); ++i) { const fef::TermFieldMatchData *tfmd = _md->resolveTermField(_terms.handles[i]); - if (tfmd->getDocId() == data.getDocId()) { + if (tfmd->getDocId() == docId) { _pos[i] = tfmd->begin(); _end[i] = tfmd->end(); if (_pos[i] != _end[i]) { diff --git a/searchlib/src/vespa/searchlib/features/euclidean_distance_feature.cpp b/searchlib/src/vespa/searchlib/features/euclidean_distance_feature.cpp index a54973e4f15..217217e3a5f 100644 --- a/searchlib/src/vespa/searchlib/features/euclidean_distance_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/euclidean_distance_feature.cpp @@ -45,9 +45,9 @@ feature_t EuclideanDistanceExecutor<DataType>::euclideanDistance(const BufferTyp template <typename DataType> void -EuclideanDistanceExecutor<DataType>::execute(MatchData &match) +EuclideanDistanceExecutor<DataType>::execute(uint32_t docId) { - _attributeBuffer.fill(_attribute, match.getDocId()); + _attributeBuffer.fill(_attribute, docId); outputs().set_number(0, euclideanDistance(_attributeBuffer, _vector)); } diff --git a/searchlib/src/vespa/searchlib/features/euclidean_distance_feature.h b/searchlib/src/vespa/searchlib/features/euclidean_distance_feature.h index 421fd590e0a..b2f6f72c7c5 100644 --- a/searchlib/src/vespa/searchlib/features/euclidean_distance_feature.h +++ b/searchlib/src/vespa/searchlib/features/euclidean_distance_feature.h @@ -31,7 +31,7 @@ private: public: EuclideanDistanceExecutor(const search::attribute::IAttributeVector &attribute, QueryVectorType vector); - virtual void execute(fef::MatchData &data) override; + virtual void execute(uint32_t docId) override; }; diff --git a/searchlib/src/vespa/searchlib/features/fieldinfofeature.cpp b/searchlib/src/vespa/searchlib/features/fieldinfofeature.cpp index 58221186a34..86bd40cb050 100644 --- a/searchlib/src/vespa/searchlib/features/fieldinfofeature.cpp +++ b/searchlib/src/vespa/searchlib/features/fieldinfofeature.cpp @@ -31,13 +31,13 @@ IndexFieldInfoExecutor::IndexFieldInfoExecutor(feature_t type, feature_t isFilte } void -IndexFieldInfoExecutor::execute(fef::MatchData &data) +IndexFieldInfoExecutor::execute(uint32_t docId) { outputs().set_number(0, _type); outputs().set_number(1, _isFilter); outputs().set_number(2, 1.0f); // searched const fef::TermFieldMatchData *tfmd = _md->resolveTermField(_fieldHandle); - if (tfmd->getDocId() == data.getDocId()) { + if (tfmd->getDocId() == docId) { outputs().set_number(3, 1.0f); // hit } else { outputs().set_number(3, 0.0f); // no hit @@ -80,13 +80,13 @@ AttrFieldInfoExecutor::AttrFieldInfoExecutor(feature_t type, uint32_t fieldHandl } void -AttrFieldInfoExecutor::execute(fef::MatchData &data) +AttrFieldInfoExecutor::execute(uint32_t docId) { outputs().set_number(0, _type); outputs().set_number(1, 0.0); // not filter outputs().set_number(2, 1.0f); // searched const fef::TermFieldMatchData *tfmd = _md->resolveTermField(_fieldHandle); - if (tfmd->getDocId() == data.getDocId()) { + if (tfmd->getDocId() == docId) { outputs().set_number(3, 1.0f); // hit outputs().set_number(4, fef::FieldPositionsIterator::UNKNOWN_LENGTH); // len outputs().set_number(5, 0.0f); // first diff --git a/searchlib/src/vespa/searchlib/features/fieldinfofeature.h b/searchlib/src/vespa/searchlib/features/fieldinfofeature.h index 5e6be1608f8..3d507df4ec3 100644 --- a/searchlib/src/vespa/searchlib/features/fieldinfofeature.h +++ b/searchlib/src/vespa/searchlib/features/fieldinfofeature.h @@ -25,7 +25,7 @@ private: public: IndexFieldInfoExecutor(feature_t type, feature_t isFilter, uint32_t field, uint32_t fieldHandle); - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; //----------------------------------------------------------------------------- @@ -41,7 +41,7 @@ private: public: AttrFieldInfoExecutor(feature_t type, uint32_t fieldHandle); - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; //----------------------------------------------------------------------------- diff --git a/searchlib/src/vespa/searchlib/features/fieldlengthfeature.cpp b/searchlib/src/vespa/searchlib/features/fieldlengthfeature.cpp index ce6c829df0a..413c538ba85 100644 --- a/searchlib/src/vespa/searchlib/features/fieldlengthfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/fieldlengthfeature.cpp @@ -33,7 +33,7 @@ FieldLengthExecutor(const IQueryEnvironment &env, } void -FieldLengthExecutor::execute(MatchData &match) +FieldLengthExecutor::execute(uint32_t docId) { uint32_t val = 0; bool validVal = false; @@ -42,7 +42,7 @@ FieldLengthExecutor::execute(MatchData &match) hi != hie; ++hi) { const TermFieldMatchData &tfmd = *_md->resolveTermField(*hi); - if (tfmd.getDocId() == match.getDocId()) { + if (tfmd.getDocId() == docId) { FieldPositionsIterator it = tfmd.getIterator(); if (it.valid()) { if (val < it.getFieldLength()) diff --git a/searchlib/src/vespa/searchlib/features/fieldlengthfeature.h b/searchlib/src/vespa/searchlib/features/fieldlengthfeature.h index a83f83bb774..f469abf90b7 100644 --- a/searchlib/src/vespa/searchlib/features/fieldlengthfeature.h +++ b/searchlib/src/vespa/searchlib/features/fieldlengthfeature.h @@ -28,7 +28,7 @@ public: */ FieldLengthExecutor(const search::fef::IQueryEnvironment &env, uint32_t fieldId); - virtual void execute(search::fef::MatchData &data); + virtual void execute(uint32_t docId); }; /** diff --git a/searchlib/src/vespa/searchlib/features/fieldmatchfeature.cpp b/searchlib/src/vespa/searchlib/features/fieldmatchfeature.cpp index d78f2a19886..a1450d419c3 100644 --- a/searchlib/src/vespa/searchlib/features/fieldmatchfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/fieldmatchfeature.cpp @@ -34,12 +34,12 @@ FieldMatchExecutor::FieldMatchExecutor(const IQueryEnvironment & queryEnv, } void -FieldMatchExecutor::execute(search::fef::MatchData & match) +FieldMatchExecutor::execute(uint32_t docId) { - //LOG(info, "execute for field '%s' and docId(%u)", _field.name().c_str(), match.getDocId()); + //LOG(info, "execute for field '%s' and docId(%u)", _field.name().c_str(), docId); _splitter.update(); - _cmp.reset(match.getDocId()); + _cmp.reset(docId); //_cmp.setTracing(true); const fieldmatch::SimpleMetrics & simple = _cmp.getSimpleMetrics(); diff --git a/searchlib/src/vespa/searchlib/features/fieldmatchfeature.h b/searchlib/src/vespa/searchlib/features/fieldmatchfeature.h index 7c63615a824..e91e89f5483 100644 --- a/searchlib/src/vespa/searchlib/features/fieldmatchfeature.h +++ b/searchlib/src/vespa/searchlib/features/fieldmatchfeature.h @@ -28,7 +28,7 @@ public: FieldMatchExecutor(const search::fef::IQueryEnvironment & queryEnv, const search::fef::FieldInfo & field, const fieldmatch::Params & params); - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; diff --git a/searchlib/src/vespa/searchlib/features/fieldtermmatchfeature.cpp b/searchlib/src/vespa/searchlib/features/fieldtermmatchfeature.cpp index 3909445c87a..6c0bf057c43 100644 --- a/searchlib/src/vespa/searchlib/features/fieldtermmatchfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/fieldtermmatchfeature.cpp @@ -24,7 +24,7 @@ FieldTermMatchExecutor::FieldTermMatchExecutor(const search::fef::IQueryEnvironm } void -FieldTermMatchExecutor::execute(search::fef::MatchData &match) +FieldTermMatchExecutor::execute(uint32_t docId) { if (_fieldHandle == search::fef::IllegalHandle) { outputs().set_number(0, 1000000); // firstPosition @@ -41,7 +41,7 @@ FieldTermMatchExecutor::execute(search::fef::MatchData &match) uint32_t occurrences = 0; double sumExactness = 0; int64_t weight = 0; - if (tfmd.getDocId() == match.getDocId()) { + if (tfmd.getDocId() == docId) { search::fef::FieldPositionsIterator it = tfmd.getIterator(); if (it.valid()) { lastPosition = 0; diff --git a/searchlib/src/vespa/searchlib/features/fieldtermmatchfeature.h b/searchlib/src/vespa/searchlib/features/fieldtermmatchfeature.h index 41410e458e3..f8410c1193f 100644 --- a/searchlib/src/vespa/searchlib/features/fieldtermmatchfeature.h +++ b/searchlib/src/vespa/searchlib/features/fieldtermmatchfeature.h @@ -23,7 +23,7 @@ public: */ FieldTermMatchExecutor(const search::fef::IQueryEnvironment &env, uint32_t fieldId, uint32_t termId); - virtual void execute(search::fef::MatchData &data); + virtual void execute(uint32_t docId); private: search::fef::TermFieldHandle _fieldHandle; diff --git a/searchlib/src/vespa/searchlib/features/firstphasefeature.cpp b/searchlib/src/vespa/searchlib/features/firstphasefeature.cpp index 7b51e233fd7..daa20d06e5b 100644 --- a/searchlib/src/vespa/searchlib/features/firstphasefeature.cpp +++ b/searchlib/src/vespa/searchlib/features/firstphasefeature.cpp @@ -15,7 +15,7 @@ namespace search { namespace features { void -FirstPhaseExecutor::execute(search::fef::MatchData &) +FirstPhaseExecutor::execute(uint32_t) { outputs().set_number(0, inputs().get_number(0)); } diff --git a/searchlib/src/vespa/searchlib/features/firstphasefeature.h b/searchlib/src/vespa/searchlib/features/firstphasefeature.h index 4a96064df0f..252bdfe2c54 100644 --- a/searchlib/src/vespa/searchlib/features/firstphasefeature.h +++ b/searchlib/src/vespa/searchlib/features/firstphasefeature.h @@ -13,7 +13,7 @@ namespace features { class FirstPhaseExecutor : public search::fef::FeatureExecutor { public: virtual bool isPure() { return true; } - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; diff --git a/searchlib/src/vespa/searchlib/features/flow_completeness_feature.cpp b/searchlib/src/vespa/searchlib/features/flow_completeness_feature.cpp index 30d0b6d65c0..e1c558c7603 100644 --- a/searchlib/src/vespa/searchlib/features/flow_completeness_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/flow_completeness_feature.cpp @@ -176,7 +176,7 @@ struct State { void -FlowCompletenessExecutor::execute(search::fef::MatchData &) +FlowCompletenessExecutor::execute(uint32_t) { assert(_queue.empty()); for (size_t i = 0; i < _terms.size(); ++i) { diff --git a/searchlib/src/vespa/searchlib/features/flow_completeness_feature.h b/searchlib/src/vespa/searchlib/features/flow_completeness_feature.h index bc4a84ced7e..d329a170e75 100644 --- a/searchlib/src/vespa/searchlib/features/flow_completeness_feature.h +++ b/searchlib/src/vespa/searchlib/features/flow_completeness_feature.h @@ -72,7 +72,7 @@ public: FlowCompletenessExecutor(const search::fef::IQueryEnvironment &env, const FlowCompletenessParams ¶ms); virtual bool isPure() { return _terms.empty(); } - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; //----------------------------------------------------------------------------- diff --git a/searchlib/src/vespa/searchlib/features/foreachfeature.cpp b/searchlib/src/vespa/searchlib/features/foreachfeature.cpp index 007b2fd6ecd..718d04ed66e 100644 --- a/searchlib/src/vespa/searchlib/features/foreachfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/foreachfeature.cpp @@ -29,7 +29,7 @@ ForeachExecutor<CO, OP>::ForeachExecutor(const CO & condition, uint32_t numInput template <typename CO, typename OP> void -ForeachExecutor<CO, OP>::execute(MatchData &) +ForeachExecutor<CO, OP>::execute(uint32_t) { _operation.reset(); for (uint32_t i = 0; i < inputs().size(); ++i) { diff --git a/searchlib/src/vespa/searchlib/features/foreachfeature.h b/searchlib/src/vespa/searchlib/features/foreachfeature.h index dc51252ebd5..7d0cf4d8baf 100644 --- a/searchlib/src/vespa/searchlib/features/foreachfeature.h +++ b/searchlib/src/vespa/searchlib/features/foreachfeature.h @@ -23,7 +23,7 @@ private: public: ForeachExecutor(const CO & condition, uint32_t numInputs); - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; diff --git a/searchlib/src/vespa/searchlib/features/freshnessfeature.cpp b/searchlib/src/vespa/searchlib/features/freshnessfeature.cpp index e3febe078d1..d6955118ccb 100644 --- a/searchlib/src/vespa/searchlib/features/freshnessfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/freshnessfeature.cpp @@ -20,7 +20,7 @@ FreshnessExecutor::FreshnessExecutor(feature_t maxAge, feature_t scaleAge) : } void -FreshnessExecutor::execute(MatchData &) +FreshnessExecutor::execute(uint32_t) { feature_t age = inputs().get_number(0); LOG(debug, "Age: %f Maxage: %f res: %f\n", age, _maxAge, (age / _maxAge)); diff --git a/searchlib/src/vespa/searchlib/features/freshnessfeature.h b/searchlib/src/vespa/searchlib/features/freshnessfeature.h index 07e97f0438e..b1dc25aada9 100644 --- a/searchlib/src/vespa/searchlib/features/freshnessfeature.h +++ b/searchlib/src/vespa/searchlib/features/freshnessfeature.h @@ -22,7 +22,7 @@ public: * Constructs an executor. */ FreshnessExecutor(feature_t maxAge, feature_t scaleAge); - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; 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 58061dca870..14b517a10ca 100644 --- a/searchlib/src/vespa/searchlib/features/item_raw_score_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/item_raw_score_feature.cpp @@ -13,12 +13,12 @@ namespace search { namespace features { void -ItemRawScoreExecutor::execute(MatchData &data) +ItemRawScoreExecutor::execute(uint32_t docId) { feature_t output = 0.0; for (uint32_t i = 0; i < _handles.size(); ++i) { const TermFieldMatchData *tfmd = _md->resolveTermField(_handles[i]); - if (tfmd->getDocId() == data.getDocId()) { + if (tfmd->getDocId() == docId) { output += tfmd->getRawScore(); } } @@ -34,11 +34,11 @@ ItemRawScoreExecutor::handle_bind_match_data(MatchData &md) //----------------------------------------------------------------------------- void -SimpleItemRawScoreExecutor::execute(MatchData &data) +SimpleItemRawScoreExecutor::execute(uint32_t docId) { feature_t output = 0.0; const TermFieldMatchData *tfmd = _md->resolveTermField(_handle); - if (tfmd->getDocId() == data.getDocId()) { + if (tfmd->getDocId() == docId) { output = tfmd->getRawScore(); } outputs().set_number(0, output); 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 e8dbf42fbaf..3e737c4a2f5 100644 --- a/searchlib/src/vespa/searchlib/features/item_raw_score_feature.h +++ b/searchlib/src/vespa/searchlib/features/item_raw_score_feature.h @@ -21,7 +21,7 @@ private: public: ItemRawScoreExecutor(HandleVector handles) : FeatureExecutor(), _handles(handles), _md(nullptr) {} - virtual void execute(fef::MatchData &data); + virtual void execute(uint32_t docId); }; class SimpleItemRawScoreExecutor : public fef::FeatureExecutor @@ -35,7 +35,7 @@ private: public: SimpleItemRawScoreExecutor(fef::TermFieldHandle handle) : FeatureExecutor(), _handle(handle), _md(nullptr) {} - virtual void execute(fef::MatchData &data); + virtual void execute(uint32_t docId); }; diff --git a/searchlib/src/vespa/searchlib/features/jarowinklerdistancefeature.cpp b/searchlib/src/vespa/searchlib/features/jarowinklerdistancefeature.cpp index 7374098f605..0c933261920 100644 --- a/searchlib/src/vespa/searchlib/features/jarowinklerdistancefeature.cpp +++ b/searchlib/src/vespa/searchlib/features/jarowinklerdistancefeature.cpp @@ -45,7 +45,7 @@ JaroWinklerDistanceExecutor::JaroWinklerDistanceExecutor(const search::fef::IQue } void -JaroWinklerDistanceExecutor::execute(search::fef::MatchData &match) +JaroWinklerDistanceExecutor::execute(uint32_t docId) { // Build a list of field position iterators, one per query term. std::vector<search::fef::FieldPositionsIterator> pos; @@ -54,7 +54,7 @@ JaroWinklerDistanceExecutor::execute(search::fef::MatchData &match) const search::fef::TermFieldHandle &handle = _termFieldHandles[term]; if (handle != search::fef::IllegalHandle) { const search::fef::TermFieldMatchData &tfmd = *_md->resolveTermField(handle); - if (tfmd.getDocId() == match.getDocId()) { + if (tfmd.getDocId() == docId) { it = tfmd.getIterator(); } } diff --git a/searchlib/src/vespa/searchlib/features/jarowinklerdistancefeature.h b/searchlib/src/vespa/searchlib/features/jarowinklerdistancefeature.h index 1797dfb61da..a269a75b9f3 100644 --- a/searchlib/src/vespa/searchlib/features/jarowinklerdistancefeature.h +++ b/searchlib/src/vespa/searchlib/features/jarowinklerdistancefeature.h @@ -35,7 +35,7 @@ public: */ JaroWinklerDistanceExecutor(const search::fef::IQueryEnvironment &env, const JaroWinklerDistanceConfig &config); - virtual void execute(search::fef::MatchData &data); + virtual void execute(uint32_t docId); private: feature_t jaroWinklerProximity(const std::vector<search::fef::FieldPositionsIterator> &termPos, uint32_t fieldLen); diff --git a/searchlib/src/vespa/searchlib/features/matchcountfeature.cpp b/searchlib/src/vespa/searchlib/features/matchcountfeature.cpp index 88e24cde5ba..98e574155ba 100644 --- a/searchlib/src/vespa/searchlib/features/matchcountfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/matchcountfeature.cpp @@ -28,12 +28,12 @@ MatchCountExecutor::MatchCountExecutor(uint32_t fieldId, const IQueryEnvironment } void -MatchCountExecutor::execute(MatchData &match) +MatchCountExecutor::execute(uint32_t docId) { size_t output = 0; for (uint32_t i = 0; i < _handles.size(); ++i) { const TermFieldMatchData *tfmd = _md->resolveTermField(_handles[i]); - if (tfmd->getDocId() == match.getDocId()) { + if (tfmd->getDocId() == docId) { output++; } } diff --git a/searchlib/src/vespa/searchlib/features/matchcountfeature.h b/searchlib/src/vespa/searchlib/features/matchcountfeature.h index a1169f69b95..23c60d4f867 100644 --- a/searchlib/src/vespa/searchlib/features/matchcountfeature.h +++ b/searchlib/src/vespa/searchlib/features/matchcountfeature.h @@ -22,7 +22,7 @@ private: public: MatchCountExecutor(uint32_t fieldId, const fef::IQueryEnvironment &env); - void execute(fef::MatchData & data) override; + void execute(uint32_t docId) override; }; /** diff --git a/searchlib/src/vespa/searchlib/features/matchesfeature.cpp b/searchlib/src/vespa/searchlib/features/matchesfeature.cpp index 072a612af28..e62b1a91785 100644 --- a/searchlib/src/vespa/searchlib/features/matchesfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/matchesfeature.cpp @@ -29,12 +29,12 @@ MatchesExecutor::MatchesExecutor(uint32_t fieldId, } void -MatchesExecutor::execute(MatchData &match) +MatchesExecutor::execute(uint32_t docId) { size_t output = 0; for (uint32_t i = 0; i < _handles.size(); ++i) { const TermFieldMatchData *tfmd = _md->resolveTermField(_handles[i]); - if (tfmd->getDocId() == match.getDocId()) { + if (tfmd->getDocId() == docId) { output = 1; break; } diff --git a/searchlib/src/vespa/searchlib/features/matchesfeature.h b/searchlib/src/vespa/searchlib/features/matchesfeature.h index 4ff2eb62605..054158b955c 100644 --- a/searchlib/src/vespa/searchlib/features/matchesfeature.h +++ b/searchlib/src/vespa/searchlib/features/matchesfeature.h @@ -24,7 +24,7 @@ public: MatchesExecutor(uint32_t fieldId, const search::fef::IQueryEnvironment &env, uint32_t begin, uint32_t end); - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; /** diff --git a/searchlib/src/vespa/searchlib/features/matchfeature.cpp b/searchlib/src/vespa/searchlib/features/matchfeature.cpp index a4c1b18925d..ca14e55232f 100644 --- a/searchlib/src/vespa/searchlib/features/matchfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/matchfeature.cpp @@ -25,7 +25,7 @@ MatchExecutor::MatchExecutor(const MatchParams & params) : } void -MatchExecutor::execute(MatchData &) +MatchExecutor::execute(uint32_t) { feature_t sum = 0.0f; feature_t totalWeight = 0.0f; diff --git a/searchlib/src/vespa/searchlib/features/matchfeature.h b/searchlib/src/vespa/searchlib/features/matchfeature.h index d904e96f508..30d28f22370 100644 --- a/searchlib/src/vespa/searchlib/features/matchfeature.h +++ b/searchlib/src/vespa/searchlib/features/matchfeature.h @@ -25,7 +25,7 @@ public: * Constructs an executor. */ MatchExecutor(const MatchParams & params); - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; 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 f3d15b5b8ba..9e2384b08c8 100644 --- a/searchlib/src/vespa/searchlib/features/native_dot_product_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/native_dot_product_feature.cpp @@ -25,12 +25,12 @@ NativeDotProductExecutor::NativeDotProductExecutor(const search::fef::IQueryEnvi } void -NativeDotProductExecutor::execute(MatchData &data) +NativeDotProductExecutor::execute(uint32_t docId) { feature_t output = 0.0; for (uint32_t i = 0; i < _pairs.size(); ++i) { const TermFieldMatchData *tfmd = _md->resolveTermField(_pairs[i].first); - if (tfmd->getDocId() == data.getDocId()) { + if (tfmd->getDocId() == docId) { output += (tfmd->getWeight() * (int32_t)_pairs[i].second.percent()); } } 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 a46b7dc114f..4baa10567dd 100644 --- a/searchlib/src/vespa/searchlib/features/native_dot_product_feature.h +++ b/searchlib/src/vespa/searchlib/features/native_dot_product_feature.h @@ -21,7 +21,7 @@ private: public: NativeDotProductExecutor(const search::fef::IQueryEnvironment &env, uint32_t fieldId); - virtual void execute(search::fef::MatchData &data); + virtual void execute(uint32_t docId); }; //----------------------------------------------------------------------------- diff --git a/searchlib/src/vespa/searchlib/features/nativeattributematchfeature.cpp b/searchlib/src/vespa/searchlib/features/nativeattributematchfeature.cpp index cac14c687f6..6d92e8694bf 100644 --- a/searchlib/src/vespa/searchlib/features/nativeattributematchfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/nativeattributematchfeature.cpp @@ -63,12 +63,12 @@ NativeAttributeMatchExecutor::createExecutor(const IQueryEnvironment & env, } void -NativeAttributeMatchExecutorMulti::execute(MatchData & match) +NativeAttributeMatchExecutorMulti::execute(uint32_t docId) { feature_t score = 0; for (size_t i = 0; i < _queryTermData.size(); ++i) { const TermFieldMatchData *tfmd = _md->resolveTermField(_queryTermData[i].tfh); - if (tfmd->getDocId() == match.getDocId()) { + if (tfmd->getDocId() == docId) { score += calculateScore(_queryTermData[i], *tfmd); } } @@ -82,10 +82,10 @@ NativeAttributeMatchExecutorMulti::handle_bind_match_data(MatchData &md) } void -NativeAttributeMatchExecutorSingle::execute(MatchData & match) +NativeAttributeMatchExecutorSingle::execute(uint32_t docId) { const TermFieldMatchData &tfmd = *_md->resolveTermField(_queryTermData.tfh); - outputs().set_number(0, (tfmd.getDocId() == match.getDocId()) + outputs().set_number(0, (tfmd.getDocId() == docId) ? calculateScore(_queryTermData, tfmd) : 0); } diff --git a/searchlib/src/vespa/searchlib/features/nativeattributematchfeature.h b/searchlib/src/vespa/searchlib/features/nativeattributematchfeature.h index 03a03dac96e..dc535c57d3d 100644 --- a/searchlib/src/vespa/searchlib/features/nativeattributematchfeature.h +++ b/searchlib/src/vespa/searchlib/features/nativeattributematchfeature.h @@ -65,7 +65,7 @@ private: public: NativeAttributeMatchExecutorMulti(const Precomputed & setup) : _divisor(setup.second), _queryTermData(setup.first), _md(nullptr) { } // Inherit doc from FeatureExecutor. - virtual void execute(fef::MatchData & data); + virtual void execute(uint32_t docId); }; class NativeAttributeMatchExecutorSingle : public NativeAttributeMatchExecutor @@ -84,7 +84,7 @@ public: _queryTermData.scale /= setup.second; } // Inherit doc from FeatureExecutor. - virtual void execute(fef::MatchData & data); + virtual void execute(uint32_t docId); }; diff --git a/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.cpp b/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.cpp index d315a47ab23..b44ad81bc41 100644 --- a/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.cpp @@ -19,14 +19,14 @@ namespace features { const uint32_t NativeFieldMatchParam::NOT_DEF_FIELD_LENGTH(std::numeric_limits<uint32_t>::max()); feature_t -NativeFieldMatchExecutor::calculateScore(const MyQueryTerm &qt, MatchData &md) +NativeFieldMatchExecutor::calculateScore(const MyQueryTerm &qt, uint32_t docId) { feature_t termScore = 0; for (size_t i = 0; i < qt.handles().size(); ++i) { TermFieldHandle tfh = qt.handles()[i]; const TermFieldMatchData *tfmd = _md->resolveTermField(tfh); const NativeFieldMatchParam & param = _params.vector[tfmd->getFieldId()]; - if (tfmd->getDocId() == md.getDocId()) { // do we have a hit + if (tfmd->getDocId() == docId) { // do we have a hit FieldPositionsIterator pos = tfmd->getIterator(); if (pos.valid()) { uint32_t fieldLength = getFieldLength(param, pos.getFieldLength()); @@ -73,11 +73,11 @@ NativeFieldMatchExecutor::NativeFieldMatchExecutor(const IQueryEnvironment & env } void -NativeFieldMatchExecutor::execute(search::fef::MatchData &match) +NativeFieldMatchExecutor::execute(uint32_t docId) { feature_t score = 0; for (size_t i = 0; i < _queryTerms.size(); ++i) { - score += calculateScore(_queryTerms[i], match); + score += calculateScore(_queryTerms[i], docId); } if (_divisor > 0) { score /= _divisor; diff --git a/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.h b/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.h index b11e44842e9..980f14c58fb 100644 --- a/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.h +++ b/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.h @@ -54,7 +54,7 @@ private: feature_t _divisor; const fef::MatchData *_md; - VESPA_DLL_LOCAL feature_t calculateScore(const MyQueryTerm &qt, search::fef::MatchData &md); + VESPA_DLL_LOCAL feature_t calculateScore(const MyQueryTerm &qt, uint32_t docId); uint32_t getFieldLength(const NativeFieldMatchParam & param, uint32_t fieldLength) const { if (param.averageFieldLength != NativeFieldMatchParam::NOT_DEF_FIELD_LENGTH) { @@ -80,7 +80,7 @@ private: public: NativeFieldMatchExecutor(const search::fef::IQueryEnvironment & env, const NativeFieldMatchParams & params); - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); feature_t getFirstOccBoost(uint32_t field, uint32_t position, uint32_t fieldLength) const { return getFirstOccBoost(_params.vector[field], position, fieldLength); diff --git a/searchlib/src/vespa/searchlib/features/nativeproximityfeature.cpp b/searchlib/src/vespa/searchlib/features/nativeproximityfeature.cpp index 569a9fe4ed6..0d6eb2fb4fb 100644 --- a/searchlib/src/vespa/searchlib/features/nativeproximityfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/nativeproximityfeature.cpp @@ -18,11 +18,11 @@ namespace search { namespace features { feature_t -NativeProximityExecutor::calculateScoreForField(const FieldSetup & fs) +NativeProximityExecutor::calculateScoreForField(const FieldSetup & fs, uint32_t docId) { feature_t score = 0; for (size_t i = 0; i < fs.pairs.size(); ++i) { - score += calculateScoreForPair(fs.pairs[i], fs.fieldId); + score += calculateScoreForPair(fs.pairs[i], fs.fieldId, docId); } score *= _params.vector[fs.fieldId].fieldWeight; if (fs.divisor > 0) { @@ -32,13 +32,13 @@ NativeProximityExecutor::calculateScoreForField(const FieldSetup & fs) } feature_t -NativeProximityExecutor::calculateScoreForPair(const TermPair & pair, uint32_t fieldId) +NativeProximityExecutor::calculateScoreForPair(const TermPair & pair, uint32_t fieldId, uint32_t docId) { const NativeProximityParam & param = _params.vector[fieldId]; TermDistanceCalculator::Result result; const QueryTerm & a = pair.first; const QueryTerm & b = pair.second; - TermDistanceCalculator::run(a, b, *_md, result); + TermDistanceCalculator::run(a, b, *_md, docId, result); uint32_t forwardIdx = result.forwardDist > 0 ? result.forwardDist - 1 : 0; uint32_t reverseIdx = result.reverseDist > 0 ? result.reverseDist - 1 : 0; feature_t forwardScore = param.proximityTable->get(forwardIdx) * param.proximityImportance; @@ -91,11 +91,11 @@ NativeProximityExecutor::NativeProximityExecutor(const IQueryEnvironment & env, } void -NativeProximityExecutor::execute(search::fef::MatchData &) +NativeProximityExecutor::execute(uint32_t docId) { feature_t score = 0; for (size_t i = 0; i < _setups.size(); ++i) { - score += calculateScoreForField(_setups[i]); + score += calculateScoreForField(_setups[i], docId); } if (_totalFieldWeight > 0) { score /= _totalFieldWeight; diff --git a/searchlib/src/vespa/searchlib/features/nativeproximityfeature.h b/searchlib/src/vespa/searchlib/features/nativeproximityfeature.h index 0b56e0512cf..31587f9cdd6 100644 --- a/searchlib/src/vespa/searchlib/features/nativeproximityfeature.h +++ b/searchlib/src/vespa/searchlib/features/nativeproximityfeature.h @@ -62,15 +62,15 @@ private: uint32_t _totalFieldWeight; const fef::MatchData *_md; - feature_t calculateScoreForField(const FieldSetup & fs); - feature_t calculateScoreForPair(const TermPair & pair, uint32_t fieldId); + 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; public: NativeProximityExecutor(const search::fef::IQueryEnvironment & env, const NativeProximityParams & params); - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); static void generateTermPairs(const search::fef::IQueryEnvironment & env, const QueryTermVector & terms, uint32_t slidingWindow, FieldSetup & setup); diff --git a/searchlib/src/vespa/searchlib/features/nativerankfeature.cpp b/searchlib/src/vespa/searchlib/features/nativerankfeature.cpp index 69f979f1977..ee812f2173e 100644 --- a/searchlib/src/vespa/searchlib/features/nativerankfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/nativerankfeature.cpp @@ -68,7 +68,7 @@ NativeRankExecutor::NativeRankExecutor(const NativeRankParams & params) : } void -NativeRankExecutor::execute(search::fef::MatchData &) +NativeRankExecutor::execute(uint32_t) { outputs().set_number(0, (inputs().get_number(0) * _params.fieldMatchWeight + inputs().get_number(1) * _params.proximityWeight diff --git a/searchlib/src/vespa/searchlib/features/nativerankfeature.h b/searchlib/src/vespa/searchlib/features/nativerankfeature.h index d590ddbbe5d..e0c5952f133 100644 --- a/searchlib/src/vespa/searchlib/features/nativerankfeature.h +++ b/searchlib/src/vespa/searchlib/features/nativerankfeature.h @@ -83,7 +83,7 @@ private: public: NativeRankExecutor(const NativeRankParams & params); - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; diff --git a/searchlib/src/vespa/searchlib/features/nowfeature.cpp b/searchlib/src/vespa/searchlib/features/nowfeature.cpp index a4d17e364dc..cc6614d8c06 100644 --- a/searchlib/src/vespa/searchlib/features/nowfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/nowfeature.cpp @@ -20,7 +20,7 @@ NowExecutor::NowExecutor(int64_t timestamp) : } void -NowExecutor::execute(search::fef::MatchData &) { +NowExecutor::execute(uint32_t) { outputs().set_number(0, _timestamp); } diff --git a/searchlib/src/vespa/searchlib/features/nowfeature.h b/searchlib/src/vespa/searchlib/features/nowfeature.h index 2eeffb36557..d5322612a56 100644 --- a/searchlib/src/vespa/searchlib/features/nowfeature.h +++ b/searchlib/src/vespa/searchlib/features/nowfeature.h @@ -26,7 +26,7 @@ public: * Constructs a new executor. **/ NowExecutor(int64_t timestamp); - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; /** diff --git a/searchlib/src/vespa/searchlib/features/proximityfeature.cpp b/searchlib/src/vespa/searchlib/features/proximityfeature.cpp index 9ee0be1fb0e..b8a69c38b32 100644 --- a/searchlib/src/vespa/searchlib/features/proximityfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/proximityfeature.cpp @@ -31,7 +31,7 @@ ProximityExecutor::ProximityExecutor(const search::fef::IQueryEnvironment &env, } void -ProximityExecutor::execute(search::fef::MatchData &match) +ProximityExecutor::execute(uint32_t docId) { // Cannot calculate proximity in this case if (_termA != search::fef::IllegalHandle && @@ -40,8 +40,8 @@ ProximityExecutor::execute(search::fef::MatchData &match) const fef::TermFieldMatchData &matchA = *_md->resolveTermField(_termA); const fef::TermFieldMatchData &matchB = *_md->resolveTermField(_termB); - if (matchA.getDocId() == match.getDocId() && - matchB.getDocId() == match.getDocId()) + if (matchA.getDocId() == docId && + matchB.getDocId() == docId) { if (findBest(matchA, matchB)) return; } diff --git a/searchlib/src/vespa/searchlib/features/proximityfeature.h b/searchlib/src/vespa/searchlib/features/proximityfeature.h index 811adc9b702..5d920665de2 100644 --- a/searchlib/src/vespa/searchlib/features/proximityfeature.h +++ b/searchlib/src/vespa/searchlib/features/proximityfeature.h @@ -33,7 +33,7 @@ public: */ ProximityExecutor(const search::fef::IQueryEnvironment &env, const ProximityConfig &config); - virtual void execute(search::fef::MatchData &data); + virtual void execute(uint32_t docId); private: const ProximityConfig &_config; // The proximity config. diff --git a/searchlib/src/vespa/searchlib/features/querycompletenessfeature.cpp b/searchlib/src/vespa/searchlib/features/querycompletenessfeature.cpp index 533c044ce31..f6db8a34534 100644 --- a/searchlib/src/vespa/searchlib/features/querycompletenessfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/querycompletenessfeature.cpp @@ -36,14 +36,14 @@ QueryCompletenessExecutor::QueryCompletenessExecutor(const search::fef::IQueryEn } void -QueryCompletenessExecutor::execute(search::fef::MatchData &match) +QueryCompletenessExecutor::execute(uint32_t docId) { uint32_t hit = 0, miss = 0; for (std::vector<search::fef::TermFieldHandle>::iterator it = _fieldHandles.begin(); it != _fieldHandles.end(); ++it) { const fef::TermFieldMatchData &tfmd = *_md->resolveTermField(*it); - if (tfmd.getDocId() == match.getDocId()) { + if (tfmd.getDocId() == docId) { search::fef::FieldPositionsIterator field = tfmd.getIterator(); while (field.valid() && field.getPosition() < _config.fieldBegin) { field.next(); diff --git a/searchlib/src/vespa/searchlib/features/querycompletenessfeature.h b/searchlib/src/vespa/searchlib/features/querycompletenessfeature.h index 4d60fe88d37..7ba44c4d205 100644 --- a/searchlib/src/vespa/searchlib/features/querycompletenessfeature.h +++ b/searchlib/src/vespa/searchlib/features/querycompletenessfeature.h @@ -33,7 +33,7 @@ public: */ QueryCompletenessExecutor(const search::fef::IQueryEnvironment &env, const QueryCompletenessConfig &config); - virtual void execute(search::fef::MatchData &data); + virtual void execute(uint32_t docId); private: const QueryCompletenessConfig &_config; diff --git a/searchlib/src/vespa/searchlib/features/randomfeature.cpp b/searchlib/src/vespa/searchlib/features/randomfeature.cpp index 5ddeb874442..16fb4a99edb 100644 --- a/searchlib/src/vespa/searchlib/features/randomfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/randomfeature.cpp @@ -22,10 +22,10 @@ RandomExecutor::RandomExecutor(uint64_t seed, uint64_t matchSeed) : } void -RandomExecutor::execute(search::fef::MatchData & match) +RandomExecutor::execute(uint32_t docId) { feature_t rndScore = _rnd.lrand48() / (feature_t)0x80000000u; // 2^31 - _matchRnd.srand48(_matchSeed + match.getDocId()); + _matchRnd.srand48(_matchSeed + docId); feature_t matchRndScore = _matchRnd.lrand48() / (feature_t)0x80000000u; // 2^31 //LOG(debug, "execute: %f", rndScore); outputs().set_number(0, rndScore); diff --git a/searchlib/src/vespa/searchlib/features/randomfeature.h b/searchlib/src/vespa/searchlib/features/randomfeature.h index 9a5f839bcdd..8cd9580cc6d 100644 --- a/searchlib/src/vespa/searchlib/features/randomfeature.h +++ b/searchlib/src/vespa/searchlib/features/randomfeature.h @@ -26,7 +26,7 @@ public: * Constructs a new executor. **/ RandomExecutor(uint64_t seed, uint64_t matchSeed); - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; diff --git a/searchlib/src/vespa/searchlib/features/rankingexpressionfeature.cpp b/searchlib/src/vespa/searchlib/features/rankingexpressionfeature.cpp index 5def3c93a83..16c8f76deed 100644 --- a/searchlib/src/vespa/searchlib/features/rankingexpressionfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/rankingexpressionfeature.cpp @@ -58,7 +58,7 @@ private: public: CompiledRankingExpressionExecutor(const CompiledFunction &compiled_function); - void execute(fef::MatchData &data) override; + void execute(uint32_t docId) override; }; //----------------------------------------------------------------------------- @@ -71,10 +71,13 @@ class InterpretedRankingExpressionExecutor : public fef::FeatureExecutor private: InterpretedFunction::Context _context; const InterpretedFunction &_function; + const fef::MatchData *_md; + + virtual void handle_bind_match_data(fef::MatchData &md) override; public: InterpretedRankingExpressionExecutor(const InterpretedFunction &function); - void execute(fef::MatchData &data) override; + void execute(uint32_t docId) override; }; //----------------------------------------------------------------------------- @@ -86,7 +89,7 @@ CompiledRankingExpressionExecutor::CompiledRankingExpressionExecutor(const Compi } void -CompiledRankingExpressionExecutor::execute(fef::MatchData &) +CompiledRankingExpressionExecutor::execute(uint32_t) { for (size_t i = 0; i < _params.size(); ++i) { _params[i] = inputs().get_number(i); @@ -98,16 +101,17 @@ CompiledRankingExpressionExecutor::execute(fef::MatchData &) InterpretedRankingExpressionExecutor::InterpretedRankingExpressionExecutor(const InterpretedFunction &function) : _context(), - _function(function) + _function(function), + _md(nullptr) { } void -InterpretedRankingExpressionExecutor::execute(fef::MatchData &data) +InterpretedRankingExpressionExecutor::execute(uint32_t) { _context.clear_params(); for (size_t i = 0; i < _function.num_params(); ++i) { - if (data.feature_is_object(inputs()[i])) { + if (_md->feature_is_object(inputs()[i])) { _context.add_param(inputs().get_object(i)); } else { _context.add_param(inputs().get_number(i)); @@ -116,6 +120,12 @@ InterpretedRankingExpressionExecutor::execute(fef::MatchData &data) outputs().set_object(0, _function.eval(_context)); } +void +InterpretedRankingExpressionExecutor::handle_bind_match_data(fef::MatchData &md) +{ + _md = &md; +} + //----------------------------------------------------------------------------- RankingExpressionBlueprint::RankingExpressionBlueprint() diff --git a/searchlib/src/vespa/searchlib/features/raw_score_feature.cpp b/searchlib/src/vespa/searchlib/features/raw_score_feature.cpp index 6a1f1466d33..efee81ffd6c 100644 --- a/searchlib/src/vespa/searchlib/features/raw_score_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/raw_score_feature.cpp @@ -25,12 +25,12 @@ RawScoreExecutor::RawScoreExecutor(const search::fef::IQueryEnvironment &env, ui } void -RawScoreExecutor::execute(MatchData &data) +RawScoreExecutor::execute(uint32_t docId) { feature_t output = 0.0; for (uint32_t i = 0; i < _handles.size(); ++i) { const TermFieldMatchData *tfmd = _md->resolveTermField(_handles[i]); - if (tfmd->getDocId() == data.getDocId()) { + if (tfmd->getDocId() == docId) { output += tfmd->getRawScore(); } } diff --git a/searchlib/src/vespa/searchlib/features/raw_score_feature.h b/searchlib/src/vespa/searchlib/features/raw_score_feature.h index 902a813d733..70ef8170def 100644 --- a/searchlib/src/vespa/searchlib/features/raw_score_feature.h +++ b/searchlib/src/vespa/searchlib/features/raw_score_feature.h @@ -17,7 +17,7 @@ private: virtual void handle_bind_match_data(fef::MatchData &md) override; public: RawScoreExecutor(const search::fef::IQueryEnvironment &env, uint32_t fieldId); - virtual void execute(search::fef::MatchData &data); + virtual void execute(uint32_t docId); }; //----------------------------------------------------------------------------- diff --git a/searchlib/src/vespa/searchlib/features/reverseproximityfeature.cpp b/searchlib/src/vespa/searchlib/features/reverseproximityfeature.cpp index 6fa23873d48..aba27c891ed 100644 --- a/searchlib/src/vespa/searchlib/features/reverseproximityfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/reverseproximityfeature.cpp @@ -33,7 +33,7 @@ ReverseProximityExecutor::ReverseProximityExecutor(const search::fef::IQueryEnvi } void -ReverseProximityExecutor::execute(search::fef::MatchData &match) +ReverseProximityExecutor::execute(uint32_t docId) { // Cannot calculate proximity in this case if (_termA == search::fef::IllegalHandle || _termB == search::fef::IllegalHandle) { @@ -48,7 +48,7 @@ ReverseProximityExecutor::execute(search::fef::MatchData &match) search::fef::FieldPositionsIterator itA, itB; const fef::TermFieldMatchData &matchA = *_md->resolveTermField(_termA); const fef::TermFieldMatchData &matchB = *_md->resolveTermField(_termB); - if (matchA.getDocId() == match.getDocId() && matchB.getDocId() == match.getDocId()) { + if (matchA.getDocId() == docId && matchB.getDocId() == docId) { itA = matchA.getIterator(); itB = matchB.getIterator(); if (itA.valid() && itB.valid()) { diff --git a/searchlib/src/vespa/searchlib/features/reverseproximityfeature.h b/searchlib/src/vespa/searchlib/features/reverseproximityfeature.h index a058622ddbf..d05b0b86196 100644 --- a/searchlib/src/vespa/searchlib/features/reverseproximityfeature.h +++ b/searchlib/src/vespa/searchlib/features/reverseproximityfeature.h @@ -33,7 +33,7 @@ public: */ ReverseProximityExecutor(const search::fef::IQueryEnvironment &env, const ReverseProximityConfig &config); - virtual void execute(search::fef::MatchData &data); + virtual void execute(uint32_t docId); private: const ReverseProximityConfig &_config; // The proximity config. diff --git a/searchlib/src/vespa/searchlib/features/subqueries_feature.cpp b/searchlib/src/vespa/searchlib/features/subqueries_feature.cpp index 9e211dc5f24..3fddc81268b 100644 --- a/searchlib/src/vespa/searchlib/features/subqueries_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/subqueries_feature.cpp @@ -25,12 +25,12 @@ SubqueriesExecutor::SubqueriesExecutor(const IQueryEnvironment &env, } } -void SubqueriesExecutor::execute(MatchData &data) { +void SubqueriesExecutor::execute(uint32_t docId) { uint32_t lsb = 0; uint32_t msb = 0; for (uint32_t i = 0; i < _handles.size(); ++i) { const TermFieldMatchData *tfmd = _md->resolveTermField(_handles[i]); - if (tfmd->getDocId() == data.getDocId()) { + if (tfmd->getDocId() == docId) { lsb |= static_cast<uint32_t>(tfmd->getSubqueries()); msb |= tfmd->getSubqueries() >> 32; } diff --git a/searchlib/src/vespa/searchlib/features/subqueries_feature.h b/searchlib/src/vespa/searchlib/features/subqueries_feature.h index 93c62edf163..a62131040a0 100644 --- a/searchlib/src/vespa/searchlib/features/subqueries_feature.h +++ b/searchlib/src/vespa/searchlib/features/subqueries_feature.h @@ -17,7 +17,7 @@ class SubqueriesExecutor : public search::fef::FeatureExecutor { public: SubqueriesExecutor(const search::fef::IQueryEnvironment &env, uint32_t fieldId); - virtual void execute(search::fef::MatchData &data); + virtual void execute(uint32_t docId); }; //----------------------------------------------------------------------------- diff --git a/searchlib/src/vespa/searchlib/features/tensor_attribute_executor.cpp b/searchlib/src/vespa/searchlib/features/tensor_attribute_executor.cpp index 5f7522ddf9e..b1eee1bc7ad 100644 --- a/searchlib/src/vespa/searchlib/features/tensor_attribute_executor.cpp +++ b/searchlib/src/vespa/searchlib/features/tensor_attribute_executor.cpp @@ -18,9 +18,9 @@ TensorAttributeExecutor(const search::tensor::TensorAttribute *attribute) } void -TensorAttributeExecutor::execute(fef::MatchData &data) +TensorAttributeExecutor::execute(uint32_t docId) { - auto tensor = _attribute->getTensor(data.getDocId()); + auto tensor = _attribute->getTensor(docId); if (!tensor) { _tensor = TensorValue(*_emptyTensor); } else { diff --git a/searchlib/src/vespa/searchlib/features/tensor_attribute_executor.h b/searchlib/src/vespa/searchlib/features/tensor_attribute_executor.h index e07198f0ce4..b0846380e63 100644 --- a/searchlib/src/vespa/searchlib/features/tensor_attribute_executor.h +++ b/searchlib/src/vespa/searchlib/features/tensor_attribute_executor.h @@ -21,7 +21,7 @@ private: public: TensorAttributeExecutor(const search::tensor::TensorAttribute *attribute); - virtual void execute(fef::MatchData &data); + virtual void execute(uint32_t docId); }; } // namespace features diff --git a/searchlib/src/vespa/searchlib/features/tensor_from_attribute_executor.h b/searchlib/src/vespa/searchlib/features/tensor_from_attribute_executor.h index 63b6294d52b..64601a7bf19 100644 --- a/searchlib/src/vespa/searchlib/features/tensor_from_attribute_executor.h +++ b/searchlib/src/vespa/searchlib/features/tensor_from_attribute_executor.h @@ -34,14 +34,14 @@ public: { _attrBuffer.allocate(_attribute->getMaxValueCount()); } - virtual void execute(fef::MatchData &data); + virtual void execute(uint32_t docId); }; template <typename WeightedBufferType> void -TensorFromAttributeExecutor<WeightedBufferType>::execute(fef::MatchData &data) +TensorFromAttributeExecutor<WeightedBufferType>::execute(uint32_t docId) { - _attrBuffer.fill(*_attribute, data.getDocId()); + _attrBuffer.fill(*_attribute, docId); vespalib::tensor::DefaultTensor::builder builder; vespalib::tensor::TensorBuilder::Dimension dimensionEnum = builder.define_dimension(_dimension); for (size_t i = 0; i < _attrBuffer.size(); ++i) { 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 d04e8eecc89..a51c16ae797 100644 --- a/searchlib/src/vespa/searchlib/features/term_field_md_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/term_field_md_feature.cpp @@ -33,7 +33,7 @@ TermFieldMdExecutor::TermFieldMdExecutor(const search::fef::IQueryEnvironment &e } void -TermFieldMdExecutor::execute(MatchData & match) +TermFieldMdExecutor::execute(uint32_t docId) { uint32_t termsmatched = 0; uint32_t occs = 0; @@ -45,7 +45,7 @@ TermFieldMdExecutor::execute(MatchData & match) const TermFieldMatchData &tfmd = *_md->resolveTermField(_terms[i].first); int32_t termWeight = _terms[i].second.percent(); - if (tfmd.getDocId() == match.getDocId()) { + if (tfmd.getDocId() == docId) { ++termsmatched; score += tfmd.getWeight(); occs += (tfmd.end() - tfmd.begin()); 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 136eec747e0..563fadf98b4 100644 --- a/searchlib/src/vespa/searchlib/features/term_field_md_feature.h +++ b/searchlib/src/vespa/searchlib/features/term_field_md_feature.h @@ -20,7 +20,7 @@ class TermFieldMdExecutor : public fef::FeatureExecutor { std::vector<Element> _terms; const fef::MatchData *_md; - virtual void execute(fef::MatchData &data); + virtual void execute(uint32_t docId); virtual void handle_bind_match_data(fef::MatchData &md) override; public: diff --git a/searchlib/src/vespa/searchlib/features/termdistancecalculator.cpp b/searchlib/src/vespa/searchlib/features/termdistancecalculator.cpp index 78430030d51..ef8d1005a17 100644 --- a/searchlib/src/vespa/searchlib/features/termdistancecalculator.cpp +++ b/searchlib/src/vespa/searchlib/features/termdistancecalculator.cpp @@ -17,11 +17,11 @@ const uint32_t TermDistanceCalculator::UNDEFINED_VALUE(1000000); void TermDistanceCalculator::run(const QueryTerm &termX, const QueryTerm &termY, - const MatchData & match, Result & r) + const MatchData & match, uint32_t docId, Result & r) { const TermFieldMatchData *tmdX = match.resolveTermField(termX.fieldHandle()); const TermFieldMatchData *tmdY = match.resolveTermField(termY.fieldHandle()); - if (tmdX->getDocId() != match.getDocId() || tmdY->getDocId() != match.getDocId()) { + if (tmdX->getDocId() != docId || tmdY->getDocId() != docId) { return; } findBest(tmdX, tmdY, termX.termData()->getPhraseLength(), r.forwardDist, r.forwardTermPos); diff --git a/searchlib/src/vespa/searchlib/features/termdistancecalculator.h b/searchlib/src/vespa/searchlib/features/termdistancecalculator.h index 5e543095e1c..ae22d6fe38d 100644 --- a/searchlib/src/vespa/searchlib/features/termdistancecalculator.h +++ b/searchlib/src/vespa/searchlib/features/termdistancecalculator.h @@ -73,7 +73,7 @@ public: * NB: Both query terms must have attached term fields with valid term field handles. **/ static void run(const QueryTerm &termX, const QueryTerm &termY, - const search::fef::MatchData & match, Result & r); + const search::fef::MatchData & match, uint32_t docId, Result & r); }; } // namespace features diff --git a/searchlib/src/vespa/searchlib/features/termdistancefeature.cpp b/searchlib/src/vespa/searchlib/features/termdistancefeature.cpp index 4a2214b174f..fd7bef0f201 100644 --- a/searchlib/src/vespa/searchlib/features/termdistancefeature.cpp +++ b/searchlib/src/vespa/searchlib/features/termdistancefeature.cpp @@ -20,7 +20,8 @@ TermDistanceExecutor::TermDistanceExecutor(const IQueryEnvironment & env, FeatureExecutor(), _params(params), _termA(env.getTerm(params.termX)), - _termB(env.getTerm(params.termY)) + _termB(env.getTerm(params.termY)), + _md(nullptr) { _termA.fieldHandle(util::getTermFieldData(env, params.termX, params.fieldId)); _termB.fieldHandle(util::getTermFieldData(env, params.termY, params.fieldId)); @@ -33,16 +34,21 @@ bool TermDistanceExecutor::valid() const } void -TermDistanceExecutor::execute(MatchData & match) +TermDistanceExecutor::execute(uint32_t docId) { TermDistanceCalculator::Result result; - TermDistanceCalculator::run(_termA, _termB, match, result); + TermDistanceCalculator::run(_termA, _termB, *_md, docId, result); outputs().set_number(0, result.forwardDist); outputs().set_number(1, result.forwardTermPos); outputs().set_number(2, result.reverseDist); outputs().set_number(3, result.reverseTermPos); } +void +TermDistanceExecutor::handle_bind_match_data(fef::MatchData &md) +{ + _md = &md; +} TermDistanceBlueprint::TermDistanceBlueprint() : Blueprint("termDistance"), diff --git a/searchlib/src/vespa/searchlib/features/termdistancefeature.h b/searchlib/src/vespa/searchlib/features/termdistancefeature.h index daea4e92aaf..28b9c4478ed 100644 --- a/searchlib/src/vespa/searchlib/features/termdistancefeature.h +++ b/searchlib/src/vespa/searchlib/features/termdistancefeature.h @@ -29,11 +29,14 @@ private: const TermDistanceParams & _params; QueryTerm _termA; QueryTerm _termB; + const fef::MatchData *_md; + + virtual void handle_bind_match_data(fef::MatchData &md) override; public: TermDistanceExecutor(const search::fef::IQueryEnvironment & env, const TermDistanceParams & params); - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); bool valid() const; }; diff --git a/searchlib/src/vespa/searchlib/features/termeditdistancefeature.cpp b/searchlib/src/vespa/searchlib/features/termeditdistancefeature.cpp index e3f1c29fe2b..da730ccc996 100644 --- a/searchlib/src/vespa/searchlib/features/termeditdistancefeature.cpp +++ b/searchlib/src/vespa/searchlib/features/termeditdistancefeature.cpp @@ -74,7 +74,7 @@ TermEditDistanceExecutor::TermEditDistanceExecutor(const search::fef::IQueryEnvi } void -TermEditDistanceExecutor::execute(search::fef::MatchData &match) +TermEditDistanceExecutor::execute(uint32_t docId) { // Determine the number of terms in the field. uint32_t numQueryTerms = _fieldHandles.size(); @@ -105,7 +105,7 @@ TermEditDistanceExecutor::execute(search::fef::MatchData &match) search::fef::TermFieldHandle handle = _fieldHandles[query - 1]; if (handle != search::fef::IllegalHandle) { const fef::TermFieldMatchData &tfmd = *_md->resolveTermField(handle); - if (tfmd.getDocId() == match.getDocId()) { + if (tfmd.getDocId() == docId) { it = tfmd.getIterator(); // this is now valid while (it.valid() && it.getPosition() < fieldBegin) { it.next(); // forward to window diff --git a/searchlib/src/vespa/searchlib/features/termeditdistancefeature.h b/searchlib/src/vespa/searchlib/features/termeditdistancefeature.h index 9eeafa0b5cb..9cf4678fe15 100644 --- a/searchlib/src/vespa/searchlib/features/termeditdistancefeature.h +++ b/searchlib/src/vespa/searchlib/features/termeditdistancefeature.h @@ -78,9 +78,9 @@ public: * * After completing the matrix, the minimum cost is contained in the bottom-right. * - * @param data All available match data. + * @param docid local document id to be evaluated */ - virtual void execute(search::fef::MatchData &data); + virtual void execute(uint32_t docId); private: /** diff --git a/searchlib/src/vespa/searchlib/features/termfeature.cpp b/searchlib/src/vespa/searchlib/features/termfeature.cpp index afd1de06a59..a7ffb9a7bee 100644 --- a/searchlib/src/vespa/searchlib/features/termfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/termfeature.cpp @@ -31,7 +31,7 @@ TermExecutor::TermExecutor(const search::fef::IQueryEnvironment &env, } void -TermExecutor::execute(search::fef::MatchData &) +TermExecutor::execute(uint32_t) { if (_termData == NULL) { // this query term is not present in the query outputs().set_number(0, 0.0f); // connectedness diff --git a/searchlib/src/vespa/searchlib/features/termfeature.h b/searchlib/src/vespa/searchlib/features/termfeature.h index 686579f2a89..8dcef37d714 100644 --- a/searchlib/src/vespa/searchlib/features/termfeature.h +++ b/searchlib/src/vespa/searchlib/features/termfeature.h @@ -23,7 +23,7 @@ public: */ TermExecutor(const search::fef::IQueryEnvironment &env, uint32_t termId); - virtual void execute(search::fef::MatchData &data); + virtual void execute(uint32_t docId); private: const search::fef::ITermData *_termData; diff --git a/searchlib/src/vespa/searchlib/features/text_similarity_feature.cpp b/searchlib/src/vespa/searchlib/features/text_similarity_feature.cpp index ac574f55569..036aabfca59 100644 --- a/searchlib/src/vespa/searchlib/features/text_similarity_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/text_similarity_feature.cpp @@ -108,11 +108,11 @@ TextSimilarityExecutor::TextSimilarityExecutor(const search::fef::IQueryEnvironm } void -TextSimilarityExecutor::execute(search::fef::MatchData &data) +TextSimilarityExecutor::execute(uint32_t docId) { for (size_t i = 0; i < _handles.size(); ++i) { const fef::TermFieldMatchData *tfmd = _md->resolveTermField(_handles[i]); - if (tfmd->getDocId() == data.getDocId()) { + if (tfmd->getDocId() == docId) { Item item(i, tfmd->begin(), tfmd->end()); if (item.pos != item.end) { _queue.push(item); diff --git a/searchlib/src/vespa/searchlib/features/text_similarity_feature.h b/searchlib/src/vespa/searchlib/features/text_similarity_feature.h index be7f478380a..6129e285fe5 100644 --- a/searchlib/src/vespa/searchlib/features/text_similarity_feature.h +++ b/searchlib/src/vespa/searchlib/features/text_similarity_feature.h @@ -42,7 +42,7 @@ private: public: TextSimilarityExecutor(const search::fef::IQueryEnvironment &env, uint32_t field_id); virtual bool isPure() { return _handles.empty(); } - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; //----------------------------------------------------------------------------- diff --git a/searchlib/src/vespa/searchlib/features/valuefeature.cpp b/searchlib/src/vespa/searchlib/features/valuefeature.cpp index 4be0bcda6fd..85f062d7673 100644 --- a/searchlib/src/vespa/searchlib/features/valuefeature.cpp +++ b/searchlib/src/vespa/searchlib/features/valuefeature.cpp @@ -18,7 +18,7 @@ ValueExecutor::ValueExecutor(const std::vector<feature_t> & values) : } void -ValueExecutor::execute(search::fef::MatchData &) +ValueExecutor::execute(uint32_t) { for (uint32_t i = 0; i < _values.size(); ++i) { outputs().set_number(i, _values[i]); @@ -26,7 +26,7 @@ ValueExecutor::execute(search::fef::MatchData &) } void -SingleZeroValueExecutor::execute(search::fef::MatchData &) +SingleZeroValueExecutor::execute(uint32_t) { outputs().set_number(0, 0.0); } diff --git a/searchlib/src/vespa/searchlib/features/valuefeature.h b/searchlib/src/vespa/searchlib/features/valuefeature.h index fbffd5dcb8e..3aaeac4074d 100644 --- a/searchlib/src/vespa/searchlib/features/valuefeature.h +++ b/searchlib/src/vespa/searchlib/features/valuefeature.h @@ -19,7 +19,7 @@ private: public: ValueExecutor(const std::vector<feature_t> & values); virtual bool isPure() { return true; } - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); const std::vector<feature_t> & getValues() const { return _values; } }; @@ -28,7 +28,7 @@ class SingleZeroValueExecutor : public search::fef::FeatureExecutor public: SingleZeroValueExecutor() : FeatureExecutor() {} virtual bool isPure() { return true; } - virtual void execute(search::fef::MatchData & data); + virtual void execute(uint32_t docId); }; diff --git a/searchlib/src/vespa/searchlib/fef/featureexecutor.h b/searchlib/src/vespa/searchlib/fef/featureexecutor.h index a640ade8da1..556e53c53cf 100644 --- a/searchlib/src/vespa/searchlib/fef/featureexecutor.h +++ b/searchlib/src/vespa/searchlib/fef/featureexecutor.h @@ -199,9 +199,9 @@ public: /** * Execute this feature executor on the given data. * - * @param data data storage + * @param docid the local document id being evaluated **/ - virtual void execute(MatchData &data) = 0; + virtual void execute(uint32_t docId) = 0; /** * Virtual destructor to allow subclassing. diff --git a/searchlib/src/vespa/searchlib/fef/featureoverrider.cpp b/searchlib/src/vespa/searchlib/fef/featureoverrider.cpp index 97df24cc177..8ef0cf8d1ff 100644 --- a/searchlib/src/vespa/searchlib/fef/featureoverrider.cpp +++ b/searchlib/src/vespa/searchlib/fef/featureoverrider.cpp @@ -38,9 +38,9 @@ FeatureOverrider::isPure() } void -FeatureOverrider::execute(MatchData &data) +FeatureOverrider::execute(uint32_t docId) { - _executor.execute(data); + _executor.execute(docId); if (_outputIdx < outputs().size()) { outputs().set_number(_outputIdx, _value); } diff --git a/searchlib/src/vespa/searchlib/fef/featureoverrider.h b/searchlib/src/vespa/searchlib/fef/featureoverrider.h index f0c598c7e1b..1c3f8004018 100644 --- a/searchlib/src/vespa/searchlib/fef/featureoverrider.h +++ b/searchlib/src/vespa/searchlib/fef/featureoverrider.h @@ -38,7 +38,7 @@ public: void inputs_done() override; void outputs_done() override; bool isPure() override; - void execute(MatchData &data) override; + void execute(uint32_t docId) override; }; } // namespace fef diff --git a/searchlib/src/vespa/searchlib/fef/rank_program.cpp b/searchlib/src/vespa/searchlib/fef/rank_program.cpp index 06379e5241d..04340198289 100644 --- a/searchlib/src/vespa/searchlib/fef/rank_program.cpp +++ b/searchlib/src/vespa/searchlib/fef/rank_program.cpp @@ -65,7 +65,7 @@ struct UnboxingExecutor : FeatureExecutor { bindOutput(new_feature); } bool isPure() override { return true; } - void execute(search::fef::MatchData &) override { + void execute(uint32_t) override { outputs().set_number(0, inputs().get_object(0).get().as_double()); } }; @@ -100,7 +100,7 @@ RankProgram::compile() is_const &= is_calculated[inputs[in_idx]]; } if (is_const) { - executor.execute(md); + executor.execute(0); const auto &outputs = executor.outputs(); for (size_t out_idx = 0; out_idx < outputs.size(); ++out_idx) { is_calculated[outputs[out_idx]] = true; diff --git a/searchlib/src/vespa/searchlib/fef/rank_program.h b/searchlib/src/vespa/searchlib/fef/rank_program.h index baeddc6c11d..5a06de9a86f 100644 --- a/searchlib/src/vespa/searchlib/fef/rank_program.h +++ b/searchlib/src/vespa/searchlib/fef/rank_program.h @@ -150,7 +150,7 @@ public: MatchData &md = match_data(); md.setDocId(docid); for (FeatureExecutor *executor: _program) { - executor->execute(md); + executor->execute(docid); } } }; diff --git a/searchlib/src/vespa/searchlib/fef/test/plugin/chain.cpp b/searchlib/src/vespa/searchlib/fef/test/plugin/chain.cpp index 2537d2a8dc6..f79209270b8 100644 --- a/searchlib/src/vespa/searchlib/fef/test/plugin/chain.cpp +++ b/searchlib/src/vespa/searchlib/fef/test/plugin/chain.cpp @@ -17,7 +17,7 @@ ChainExecutor::ChainExecutor() : } void -ChainExecutor::execute(MatchData &) +ChainExecutor::execute(uint32_t) { outputs().set_number(0, inputs().get_number(0)); } diff --git a/searchlib/src/vespa/searchlib/fef/test/plugin/chain.h b/searchlib/src/vespa/searchlib/fef/test/plugin/chain.h index d82abcedb59..6d73d37b8d6 100644 --- a/searchlib/src/vespa/searchlib/fef/test/plugin/chain.h +++ b/searchlib/src/vespa/searchlib/fef/test/plugin/chain.h @@ -15,7 +15,7 @@ class ChainExecutor : public FeatureExecutor { public: ChainExecutor(); - virtual void execute(MatchData & data); + virtual void execute(uint32_t docId); }; diff --git a/searchlib/src/vespa/searchlib/fef/test/plugin/double.cpp b/searchlib/src/vespa/searchlib/fef/test/plugin/double.cpp index 8b817bb5557..5fe7539b834 100644 --- a/searchlib/src/vespa/searchlib/fef/test/plugin/double.cpp +++ b/searchlib/src/vespa/searchlib/fef/test/plugin/double.cpp @@ -13,7 +13,7 @@ namespace fef { namespace test { void -DoubleExecutor::execute(MatchData &) +DoubleExecutor::execute(uint32_t) { assert(inputs().size() == _cnt); assert(outputs().size() == _cnt); diff --git a/searchlib/src/vespa/searchlib/fef/test/plugin/double.h b/searchlib/src/vespa/searchlib/fef/test/plugin/double.h index 2b29f56e131..460581a9d92 100644 --- a/searchlib/src/vespa/searchlib/fef/test/plugin/double.h +++ b/searchlib/src/vespa/searchlib/fef/test/plugin/double.h @@ -17,7 +17,7 @@ private: size_t _cnt; public: DoubleExecutor(size_t cnt) : _cnt(cnt) {} - virtual void execute(MatchData & data); + virtual void execute(uint32_t docId); }; diff --git a/searchlib/src/vespa/searchlib/fef/test/plugin/staticrank.cpp b/searchlib/src/vespa/searchlib/fef/test/plugin/staticrank.cpp index 7ff208686fc..e3ebe02acfc 100644 --- a/searchlib/src/vespa/searchlib/fef/test/plugin/staticrank.cpp +++ b/searchlib/src/vespa/searchlib/fef/test/plugin/staticrank.cpp @@ -17,13 +17,12 @@ StaticRankExecutor::StaticRankExecutor(const search::attribute::IAttributeVector } void -StaticRankExecutor::execute(MatchData & data) +StaticRankExecutor::execute(uint32_t docId) { - uint32_t doc = data.getDocId(); search::attribute::FloatContent staticRank; if (_attribute != NULL) { staticRank.allocate(_attribute->getMaxValueCount()); - staticRank.fill(*_attribute, doc); + staticRank.fill(*_attribute, docId); } outputs().set_number(0, static_cast<feature_t>(staticRank[0])); } diff --git a/searchlib/src/vespa/searchlib/fef/test/plugin/staticrank.h b/searchlib/src/vespa/searchlib/fef/test/plugin/staticrank.h index 10467cd8d55..38f931caa6b 100644 --- a/searchlib/src/vespa/searchlib/fef/test/plugin/staticrank.h +++ b/searchlib/src/vespa/searchlib/fef/test/plugin/staticrank.h @@ -18,7 +18,7 @@ private: public: StaticRankExecutor(const search::attribute::IAttributeVector * attribute); - virtual void execute(MatchData & data); + virtual void execute(uint32_t docId); }; diff --git a/searchlib/src/vespa/searchlib/fef/test/plugin/sum.cpp b/searchlib/src/vespa/searchlib/fef/test/plugin/sum.cpp index fc4dc611f48..2e20ea12efe 100644 --- a/searchlib/src/vespa/searchlib/fef/test/plugin/sum.cpp +++ b/searchlib/src/vespa/searchlib/fef/test/plugin/sum.cpp @@ -11,7 +11,7 @@ namespace fef { namespace test { void -SumExecutor::execute(MatchData &) +SumExecutor::execute(uint32_t) { feature_t sum = 0.0f; for (uint32_t i = 0; i < inputs().size(); ++i) { diff --git a/searchlib/src/vespa/searchlib/fef/test/plugin/sum.h b/searchlib/src/vespa/searchlib/fef/test/plugin/sum.h index e62b6dd9cbf..fecc168238e 100644 --- a/searchlib/src/vespa/searchlib/fef/test/plugin/sum.h +++ b/searchlib/src/vespa/searchlib/fef/test/plugin/sum.h @@ -15,7 +15,7 @@ class SumExecutor : public FeatureExecutor { public: virtual bool isPure() { return true; } - virtual void execute(MatchData & data); + virtual void execute(uint32_t docId); }; |