// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "multisearch.h" #include #include #include #include namespace search::fef { class TermFieldMatchData; } namespace search::queryeval { /** * Search iterator for a sparse dot product, based on a set of child * search iterators. * * This class is a base class for a set of different instantiations of * DotProductSearchImpl, defined in the .cpp-file. */ class DotProductSearch : public SearchIterator { protected: DotProductSearch() {} public: // TODO: use MultiSearch::Children to pass ownership static SearchIterator::UP create(const std::vector &children, search::fef::TermFieldMatchData &tmd, bool field_is_filter, const std::vector &childMatch, const std::vector &weights, fef::MatchData::UP md); static SearchIterator::UP create(search::fef::TermFieldMatchData &tmd, bool field_is_filter, const std::vector &weights, std::vector &&iterators); }; }