diff options
author | Henning Baldersheim <balder@oath.com> | 2018-02-04 17:30:35 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@oath.com> | 2018-02-04 17:30:35 +0100 |
commit | bf468f0a4367fb5ab9117274bcceb8ba9de59109 (patch) | |
tree | a20c562874abac13c4a3d9c51f19ee6b66df71fb /streamingvisitors/src/vespa/searchvisitor/indexenvironment.h | |
parent | d1c8e15ee5f8f7cc32ff92be6b881ad01a41e31a (diff) |
Rankmanager must also handle fieldsets recursively.
Diffstat (limited to 'streamingvisitors/src/vespa/searchvisitor/indexenvironment.h')
-rw-r--r-- | streamingvisitors/src/vespa/searchvisitor/indexenvironment.h | 45 |
1 files changed, 15 insertions, 30 deletions
diff --git a/streamingvisitors/src/vespa/searchvisitor/indexenvironment.h b/streamingvisitors/src/vespa/searchvisitor/indexenvironment.h index a11e5300f03..832d99b4dde 100644 --- a/streamingvisitors/src/vespa/searchvisitor/indexenvironment.h +++ b/streamingvisitors/src/vespa/searchvisitor/indexenvironment.h @@ -34,57 +34,42 @@ public: IndexEnvironment(const search::fef::ITableManager & tableManager); ~IndexEnvironment(); - // inherit documentation - virtual const search::fef::Properties & getProperties() const override { return _properties; } + const search::fef::Properties & getProperties() const override { return _properties; } - // inherit documentation - virtual uint32_t getNumFields() const override { return _fields.size(); } + uint32_t getNumFields() const override { return _fields.size(); } - // inherit documentation - virtual const search::fef::FieldInfo * getField(uint32_t id) const override { + const search::fef::FieldInfo * getField(uint32_t id) const override { if (id >= _fields.size()) { - return NULL; + return nullptr; } return &_fields[id]; } - // inherit documentation - virtual const search::fef::FieldInfo * getFieldByName(const string & name) const override { - StringInt32Map::const_iterator itr = _fieldNames.find(name); + const search::fef::FieldInfo * getFieldByName(const string & name) const override { + auto itr = _fieldNames.find(name); if (itr == _fieldNames.end()) { - return NULL; + return nullptr; } return getField(itr->second); } - // inherit documentation - virtual const search::fef::ITableManager & getTableManager() const override { return *_tableManager; } + const search::fef::ITableManager & getTableManager() const override { + return *_tableManager; + } - virtual FeatureMotivation getFeatureMotivation() const override { + FeatureMotivation getFeatureMotivation() const override { return _motivation; } - // inherit documentation - virtual void hintFeatureMotivation(FeatureMotivation motivation) const override { + void hintFeatureMotivation(FeatureMotivation motivation) const override { _motivation = motivation; } - // inherit documentation - virtual void hintFieldAccess(uint32_t) const override {} + void hintFieldAccess(uint32_t) const override {} - // inherit documentation - virtual void hintAttributeAccess(const string & name) const override { - if (name.empty()) { - return; - } - if (_motivation == RANK) { - _rankAttributes.insert(name); - } else { - _dumpAttributes.insert(name); - } - } + void hintAttributeAccess(const string & name) const override; - virtual vespalib::eval::ConstantValue::UP getConstantValue(const vespalib::string &) const override { + vespalib::eval::ConstantValue::UP getConstantValue(const vespalib::string &) const override { return vespalib::eval::ConstantValue::UP(); } |