summaryrefslogtreecommitdiffstats
path: root/streamingvisitors/src/vespa/searchvisitor/indexenvironment.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-03-15 14:13:20 +0100
committerGitHub <noreply@github.com>2024-03-15 14:13:20 +0100
commit6549354ac97910c74450dd06756f2ee0ba25015e (patch)
treed2919433b06f5534901eefce3d6753b3cff6d71e /streamingvisitors/src/vespa/searchvisitor/indexenvironment.cpp
parent07b6f2bae557cf42165a41da3438943bb9c18009 (diff)
parent1536e13b30358d63b8722ead277d8629376957f0 (diff)
Merge pull request #30647 from vespa-engine/toregge/use-filter-setting-from-rank-profiles-and-query-terms-in-streaming-search
Use filter settings from rank profiles and query terms in streaming s…
Diffstat (limited to 'streamingvisitors/src/vespa/searchvisitor/indexenvironment.cpp')
-rw-r--r--streamingvisitors/src/vespa/searchvisitor/indexenvironment.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/streamingvisitors/src/vespa/searchvisitor/indexenvironment.cpp b/streamingvisitors/src/vespa/searchvisitor/indexenvironment.cpp
index 25c8d982f0f..726afcc959b 100644
--- a/streamingvisitors/src/vespa/searchvisitor/indexenvironment.cpp
+++ b/streamingvisitors/src/vespa/searchvisitor/indexenvironment.cpp
@@ -2,6 +2,7 @@
#include "indexenvironment.h"
#include <vespa/searchlib/fef/i_ranking_assets_repo.h>
+#include <vespa/searchlib/fef/indexproperties.h>
using namespace search::fef;
@@ -39,6 +40,16 @@ IndexEnvironment::addField(const vespalib::string& name,
}
void
+IndexEnvironment::fixup_fields()
+{
+ for (auto& field : _fields) {
+ if (indexproperties::IsFilterField::check(_properties, field.name())) {
+ field.setFilter(true);
+ }
+ }
+}
+
+void
IndexEnvironment::set_ranking_assets_repo(std::shared_ptr<const IRankingAssetsRepo> ranking_assets_repo)
{
_ranking_assets_repo = std::move(ranking_assets_repo);