diff options
author | Tor Egge <Tor.Egge@online.no> | 2023-05-10 15:36:35 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2023-05-10 16:34:28 +0200 |
commit | 9acac81a83604abe175810aac9e4373d0a80bc0a (patch) | |
tree | 4d3b57d75074e3ceebfac1d073d2f95d2d283f00 /streamingvisitors/src/vespa/searchvisitor/indexenvironment.h | |
parent | 0bd398da2e139bcbfbe0b7d234586cea11e20dab (diff) |
Setup ranking assets repo for streaming search.
Diffstat (limited to 'streamingvisitors/src/vespa/searchvisitor/indexenvironment.h')
-rw-r--r-- | streamingvisitors/src/vespa/searchvisitor/indexenvironment.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/streamingvisitors/src/vespa/searchvisitor/indexenvironment.h b/streamingvisitors/src/vespa/searchvisitor/indexenvironment.h index ef679cacdf0..88ea5a5ada8 100644 --- a/streamingvisitors/src/vespa/searchvisitor/indexenvironment.h +++ b/streamingvisitors/src/vespa/searchvisitor/indexenvironment.h @@ -12,6 +12,8 @@ #include <vespa/vespalib/stllike/hash_map.h> #include <set> +namespace search::fef { struct IRankingAssetsRepo; } + namespace streaming { /** @@ -29,6 +31,7 @@ private: mutable FeatureMotivation _motivation; mutable std::set<vespalib::string> _rankAttributes; mutable std::set<vespalib::string> _dumpAttributes; + std::shared_ptr<const search::fef::IRankingAssetsRepo> _ranking_assets_repo; public: IndexEnvironment(const search::fef::ITableManager & tableManager); @@ -71,17 +74,11 @@ public: void hintAttributeAccess(const string & name) const override; - vespalib::eval::ConstantValue::UP getConstantValue(const vespalib::string &) const override { - return vespalib::eval::ConstantValue::UP(); - } + vespalib::eval::ConstantValue::UP getConstantValue(const vespalib::string& name) const override; - vespalib::string getRankingExpression(const vespalib::string &) const override { - return {}; - } + vespalib::string getRankingExpression(const vespalib::string& name) const override; - const search::fef::OnnxModel *getOnnxModel(const vespalib::string &) const override { - return nullptr; - } + const search::fef::OnnxModel *getOnnxModel(const vespalib::string& name) const override; bool addField(const vespalib::string& name, bool isAttribute, @@ -89,6 +86,8 @@ public: search::fef::Properties & getProperties() { return _properties; } + void set_ranking_assets_repo(std::shared_ptr<const search::fef::IRankingAssetsRepo> ranking_assets_repo); + const std::set<vespalib::string> & getHintedRankAttributes() const { return _rankAttributes; } const std::set<vespalib::string> & getHintedDumpAttributes() const { return _dumpAttributes; } |