summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-10-26 11:02:20 +0200
committerGitHub <noreply@github.com>2021-10-26 11:02:20 +0200
commit2f905b7974860c15fcd5d688f7f664a8359c1530 (patch)
tree892c01c2f68af4d5d75bc67f92f7b9a478d89016
parent37d050d026ae1cdbcb1ba2dd4848107fa8d6fd61 (diff)
parentba80e1a1cef9dd17ae341d36abf9a16f3807269e (diff)
Merge pull request #19722 from vespa-engine/balder/add-properties-for-rankprofile-mutate-control
Add properties for rank-profile mutate control.
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp22
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_tools.h3
-rw-r--r--searchlib/src/tests/fef/properties/properties_test.cpp64
-rw-r--r--searchlib/src/tests/ranksetup/ranksetup_test.cpp28
-rw-r--r--searchlib/src/vespa/searchlib/fef/indexproperties.cpp151
-rw-r--r--searchlib/src/vespa/searchlib/fef/indexproperties.h60
-rw-r--r--searchlib/src/vespa/searchlib/fef/ranksetup.cpp21
-rw-r--r--searchlib/src/vespa/searchlib/fef/ranksetup.h20
9 files changed, 296 insertions, 75 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp
index 8f3b1554e0e..87b4f918d11 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp
@@ -315,7 +315,7 @@ MatchThread::findMatches(MatchTools &tools)
complete_second_phase_timer.done();
hits.setReRankedHits(std::move(kept_hits));
hits.setRanges(ranges);
- if (auto onReRankTask = matchToolsFactory.createOnReRankTask()) {
+ if (auto onReRankTask = matchToolsFactory.createOnSecondPhaseTask()) {
onReRankTask->run(hits.getReRankedHits());
}
}
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
index dfaf56e09f3..9506ca99b66 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
@@ -252,18 +252,26 @@ MatchToolsFactory::createTask(vespalib::stringref attribute, vespalib::stringref
}
std::unique_ptr<AttributeOperationTask>
MatchToolsFactory::createOnMatchTask() const {
- return createTask(execute::onmatch::Attribute::lookup(_queryEnv.getProperties(), _rankSetup.getExecuteOnMatch()._attribute),
- execute::onmatch::Operation::lookup(_queryEnv.getProperties(), _rankSetup.getExecuteOnMatch()._operation));
+ const auto & op = _rankSetup.getMutateOnMatch();
+ return createTask(execute::onmatch::Attribute::lookup(_queryEnv.getProperties(), op._attribute),
+ execute::onmatch::Operation::lookup(_queryEnv.getProperties(), op._operation));
}
std::unique_ptr<AttributeOperationTask>
-MatchToolsFactory::createOnReRankTask() const {
- return createTask(execute::onrerank::Attribute::lookup(_queryEnv.getProperties(), _rankSetup.getExecuteOnReRank()._attribute),
- execute::onrerank::Operation::lookup(_queryEnv.getProperties(), _rankSetup.getExecuteOnReRank()._operation));
+MatchToolsFactory::createOnFirstPhaseTask() const {
+ const auto & op = _rankSetup.getMutateOnFirstPhase();
+ return createTask(op._attribute, op._operation);
+}
+std::unique_ptr<AttributeOperationTask>
+MatchToolsFactory::createOnSecondPhaseTask() const {
+ const auto & op = _rankSetup.getMutateOnSecondPhase();
+ return createTask(execute::onrerank::Attribute::lookup(_queryEnv.getProperties(), op._attribute),
+ execute::onrerank::Operation::lookup(_queryEnv.getProperties(), op._operation));
}
std::unique_ptr<AttributeOperationTask>
MatchToolsFactory::createOnSummaryTask() const {
- return createTask(execute::onsummary::Attribute::lookup(_queryEnv.getProperties(), _rankSetup.getExecuteOnSummary()._attribute),
- execute::onsummary::Operation::lookup(_queryEnv.getProperties(), _rankSetup.getExecuteOnSummary()._operation));
+ const auto & op = _rankSetup.getMutateOnSummary();
+ return createTask(execute::onsummary::Attribute::lookup(_queryEnv.getProperties(), op._attribute),
+ execute::onsummary::Operation::lookup(_queryEnv.getProperties(), op._operation));
}
bool
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_tools.h b/searchcore/src/vespa/searchcore/proton/matching/match_tools.h
index 7ccae2b844e..a403b4b1a78 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_tools.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_tools.h
@@ -130,7 +130,8 @@ public:
search::queryeval::Blueprint::HitEstimate estimate() const { return _query.estimate(); }
bool has_first_phase_rank() const;
std::unique_ptr<AttributeOperationTask> createOnMatchTask() const;
- std::unique_ptr<AttributeOperationTask> createOnReRankTask() const;
+ std::unique_ptr<AttributeOperationTask> createOnFirstPhaseTask() const;
+ std::unique_ptr<AttributeOperationTask> createOnSecondPhaseTask() const;
std::unique_ptr<AttributeOperationTask> createOnSummaryTask() const;
const Query & query() const { return _query; }
diff --git a/searchlib/src/tests/fef/properties/properties_test.cpp b/searchlib/src/tests/fef/properties/properties_test.cpp
index 34af88b4fb8..8400eb2b27a 100644
--- a/searchlib/src/tests/fef/properties/properties_test.cpp
+++ b/searchlib/src/tests/fef/properties/properties_test.cpp
@@ -455,6 +455,70 @@ TEST("test stuff") {
EXPECT_TRUE(IsFilterField::check(p, "bar"));
}
{
+ EXPECT_EQUAL(mutate::on_match::Attribute::NAME, vespalib::string("vespa.mutate.on_match.attribute"));
+ EXPECT_EQUAL(mutate::on_match::Attribute::DEFAULT_VALUE, "");
+ Properties p;
+ EXPECT_EQUAL(mutate::on_match::Attribute::lookup(p), "");
+ p.add("vespa.mutate.on_match.attribute", "foobar");
+ EXPECT_EQUAL(mutate::on_match::Attribute::lookup(p), "foobar");
+ }
+ {
+ EXPECT_EQUAL(mutate::on_match::Operation::NAME, vespalib::string("vespa.mutate.on_match.operation"));
+ EXPECT_EQUAL(mutate::on_match::Operation::DEFAULT_VALUE, "");
+ Properties p;
+ EXPECT_EQUAL(mutate::on_match::Operation::lookup(p), "");
+ p.add("vespa.mutate.on_match.operation", "+=1");
+ EXPECT_EQUAL(mutate::on_match::Operation::lookup(p), "+=1");
+ }
+ {
+ EXPECT_EQUAL(mutate::on_first_phase::Attribute::NAME, vespalib::string("vespa.mutate.on_first_phase.attribute"));
+ EXPECT_EQUAL(mutate::on_first_phase::Attribute::DEFAULT_VALUE, "");
+ Properties p;
+ EXPECT_EQUAL(mutate::on_first_phase::Attribute::lookup(p), "");
+ p.add("vespa.mutate.on_first_phase.attribute", "foobar");
+ EXPECT_EQUAL(mutate::on_first_phase::Attribute::lookup(p), "foobar");
+ }
+ {
+ EXPECT_EQUAL(mutate::on_first_phase::Operation::NAME, vespalib::string("vespa.mutate.on_first_phase.operation"));
+ EXPECT_EQUAL(mutate::on_first_phase::Operation::DEFAULT_VALUE, "");
+ Properties p;
+ EXPECT_EQUAL(mutate::on_first_phase::Operation::lookup(p), "");
+ p.add("vespa.mutate.on_first_phase.operation", "+=1");
+ EXPECT_EQUAL(mutate::on_first_phase::Operation::lookup(p), "+=1");
+ }
+ {
+ EXPECT_EQUAL(mutate::on_second_phase::Attribute::NAME, vespalib::string("vespa.mutate.on_second_phase.attribute"));
+ EXPECT_EQUAL(mutate::on_second_phase::Attribute::DEFAULT_VALUE, "");
+ Properties p;
+ EXPECT_EQUAL(mutate::on_second_phase::Attribute::lookup(p), "");
+ p.add("vespa.mutate.on_second_phase.attribute", "foobar");
+ EXPECT_EQUAL(mutate::on_second_phase::Attribute::lookup(p), "foobar");
+ }
+ {
+ EXPECT_EQUAL(mutate::on_second_phase::Operation::NAME, vespalib::string("vespa.mutate.on_second_phase.operation"));
+ EXPECT_EQUAL(mutate::on_second_phase::Operation::DEFAULT_VALUE, "");
+ Properties p;
+ EXPECT_EQUAL(mutate::on_second_phase::Operation::lookup(p), "");
+ p.add("vespa.mutate.on_second_phase.operation", "+=1");
+ EXPECT_EQUAL(mutate::on_second_phase::Operation::lookup(p), "+=1");
+ }
+ {
+ EXPECT_EQUAL(mutate::on_summary::Attribute::NAME, vespalib::string("vespa.mutate.on_summary.attribute"));
+ EXPECT_EQUAL(mutate::on_summary::Attribute::DEFAULT_VALUE, "");
+ Properties p;
+ EXPECT_EQUAL(mutate::on_summary::Attribute::lookup(p), "");
+ p.add("vespa.mutate.on_summary.attribute", "foobar");
+ EXPECT_EQUAL(mutate::on_summary::Attribute::lookup(p), "foobar");
+ }
+ {
+ EXPECT_EQUAL(mutate::on_summary::Operation::NAME, vespalib::string("vespa.mutate.on_summary.operation"));
+ EXPECT_EQUAL(mutate::on_summary::Operation::DEFAULT_VALUE, "");
+ Properties p;
+ EXPECT_EQUAL(mutate::on_summary::Operation::lookup(p), "");
+ p.add("vespa.mutate.on_summary.operation", "+=1");
+ EXPECT_EQUAL(mutate::on_summary::Operation::lookup(p), "+=1");
+ }
+ {
EXPECT_EQUAL(execute::onmatch::Attribute::NAME, vespalib::string("vespa.execute.onmatch.attribute"));
EXPECT_EQUAL(execute::onmatch::Attribute::DEFAULT_VALUE, "");
Properties p;
diff --git a/searchlib/src/tests/ranksetup/ranksetup_test.cpp b/searchlib/src/tests/ranksetup/ranksetup_test.cpp
index 783405b8255..51f998d0793 100644
--- a/searchlib/src/tests/ranksetup/ranksetup_test.cpp
+++ b/searchlib/src/tests/ranksetup/ranksetup_test.cpp
@@ -522,12 +522,14 @@ void RankSetupTest::testRankSetup()
env.getProperties().add(hitcollector::EstimatePoint::NAME, "70");
env.getProperties().add(hitcollector::EstimateLimit::NAME, "80");
env.getProperties().add(hitcollector::RankScoreDropLimit::NAME, "90.5");
- env.getProperties().add(execute::onmatch::Attribute::NAME, "a");
- env.getProperties().add(execute::onmatch::Operation::NAME, "++");
- env.getProperties().add(execute::onrerank::Attribute::NAME, "b");
- env.getProperties().add(execute::onrerank::Operation::NAME, "=7");
- env.getProperties().add(execute::onsummary::Attribute::NAME, "c");
- env.getProperties().add(execute::onsummary::Operation::NAME, "--");
+ env.getProperties().add(mutate::on_match::Attribute::NAME, "a");
+ env.getProperties().add(mutate::on_match::Operation::NAME, "+=3");
+ env.getProperties().add(mutate::on_first_phase::Attribute::NAME, "b");
+ env.getProperties().add(mutate::on_first_phase::Operation::NAME, "=3");
+ env.getProperties().add(mutate::on_second_phase::Attribute::NAME, "b");
+ env.getProperties().add(mutate::on_second_phase::Operation::NAME, "=7");
+ env.getProperties().add(mutate::on_summary::Attribute::NAME, "c");
+ env.getProperties().add(mutate::on_summary::Operation::NAME, "-=2");
RankSetup rs(_factory, env);
rs.configure();
@@ -553,12 +555,14 @@ void RankSetupTest::testRankSetup()
EXPECT_EQUAL(rs.getEstimatePoint(), 70u);
EXPECT_EQUAL(rs.getEstimateLimit(), 80u);
EXPECT_EQUAL(rs.getRankScoreDropLimit(), 90.5);
- EXPECT_EQUAL(rs.getExecuteOnMatch()._attribute, "a");
- EXPECT_EQUAL(rs.getExecuteOnMatch()._operation, "++");
- EXPECT_EQUAL(rs.getExecuteOnReRank()._attribute, "b");
- EXPECT_EQUAL(rs.getExecuteOnReRank()._operation, "=7");
- EXPECT_EQUAL(rs.getExecuteOnSummary()._attribute, "c");
- EXPECT_EQUAL(rs.getExecuteOnSummary()._operation, "--");
+ EXPECT_EQUAL(rs.getMutateOnMatch()._attribute, "a");
+ EXPECT_EQUAL(rs.getMutateOnMatch()._operation, "+=3");
+ EXPECT_EQUAL(rs.getMutateOnFirstPhase()._attribute, "b");
+ EXPECT_EQUAL(rs.getMutateOnFirstPhase()._operation, "=3");
+ EXPECT_EQUAL(rs.getMutateOnSecondPhase()._attribute, "b");
+ EXPECT_EQUAL(rs.getMutateOnSecondPhase()._operation, "=7");
+ EXPECT_EQUAL(rs.getMutateOnSummary()._attribute, "c");
+ EXPECT_EQUAL(rs.getMutateOnSummary()._operation, "-=2");
}
diff --git a/searchlib/src/vespa/searchlib/fef/indexproperties.cpp b/searchlib/src/vespa/searchlib/fef/indexproperties.cpp
index d1b169739c1..604b566df2b 100644
--- a/searchlib/src/vespa/searchlib/fef/indexproperties.cpp
+++ b/searchlib/src/vespa/searchlib/fef/indexproperties.cpp
@@ -112,61 +112,140 @@ SecondPhase::lookup(const Properties &props)
} // namespace rank
-namespace execute::onmatch {
-
-const vespalib::string Attribute::NAME("vespa.execute.onmatch.attribute");
-const vespalib::string Attribute::DEFAULT_VALUE("");
-const vespalib::string Operation::NAME("vespa.execute.onmatch.operation");
-const vespalib::string Operation::DEFAULT_VALUE("");
+namespace execute {
-vespalib::string
-Attribute::lookup(const Properties &props, const vespalib::string & defaultValue) {
- return lookupString(props, NAME, defaultValue);
-}
+namespace onmatch {
-vespalib::string
-Operation::lookup(const Properties &props, const vespalib::string & defaultValue) {
- return lookupString(props, NAME, defaultValue);
-}
+ const vespalib::string Attribute::NAME("vespa.execute.onmatch.attribute");
+ const vespalib::string Attribute::DEFAULT_VALUE("");
+ const vespalib::string Operation::NAME("vespa.execute.onmatch.operation");
+ const vespalib::string Operation::DEFAULT_VALUE("");
+
+ vespalib::string
+ Attribute::lookup(const Properties &props, const vespalib::string & defaultValue) {
+ return lookupString(props, NAME, defaultValue);
+ }
+
+ vespalib::string
+ Operation::lookup(const Properties &props, const vespalib::string & defaultValue) {
+ return lookupString(props, NAME, defaultValue);
+ }
}
+namespace onrerank {
-namespace execute::onrerank {
+ const vespalib::string Attribute::NAME("vespa.execute.onrerank.attribute");
+ const vespalib::string Attribute::DEFAULT_VALUE("");
+ const vespalib::string Operation::NAME("vespa.execute.onrerank.operation");
+ const vespalib::string Operation::DEFAULT_VALUE("");
-const vespalib::string Attribute::NAME("vespa.execute.onrerank.attribute");
-const vespalib::string Attribute::DEFAULT_VALUE("");
-const vespalib::string Operation::NAME("vespa.execute.onrerank.operation");
-const vespalib::string Operation::DEFAULT_VALUE("");
+ vespalib::string
+ Attribute::lookup(const Properties &props, const vespalib::string &defaultValue) {
+ return lookupString(props, NAME, defaultValue);
+ }
+
+ vespalib::string
+ Operation::lookup(const Properties &props, const vespalib::string &defaultValue) {
+ return lookupString(props, NAME, defaultValue);
+ }
-vespalib::string
-Attribute::lookup(const Properties &props, const vespalib::string & defaultValue) {
- return lookupString(props, NAME, defaultValue);
}
-vespalib::string
-Operation::lookup(const Properties &props, const vespalib::string & defaultValue) {
- return lookupString(props, NAME, defaultValue);
+namespace onsummary {
+
+ const vespalib::string Attribute::NAME("vespa.execute.onsummary.attribute");
+ const vespalib::string Attribute::DEFAULT_VALUE("");
+ const vespalib::string Operation::NAME("vespa.execute.onsummary.operation");
+ const vespalib::string Operation::DEFAULT_VALUE("");
+
+ vespalib::string
+ Attribute::lookup(const Properties &props, const vespalib::string &defaultValue) {
+ return lookupString(props, NAME, defaultValue);
+ }
+
+ vespalib::string
+ Operation::lookup(const Properties &props, const vespalib::string &defaultValue) {
+ return lookupString(props, NAME, defaultValue);
+ }
+
+}
}
+namespace mutate {
+
+namespace on_match {
+
+ const vespalib::string Attribute::NAME("vespa.mutate.on_match.attribute");
+ const vespalib::string Attribute::DEFAULT_VALUE("");
+ const vespalib::string Operation::NAME("vespa.mutate.on_match.operation");
+ const vespalib::string Operation::DEFAULT_VALUE("");
+
+ vespalib::string
+ Attribute::lookup(const Properties &props, const vespalib::string & defaultValue) {
+ return lookupString(props, NAME, defaultValue);
+ }
+
+ vespalib::string
+ Operation::lookup(const Properties &props, const vespalib::string & defaultValue) {
+ return lookupString(props, NAME, defaultValue);
+ }
+
}
+namespace on_first_phase {
-namespace execute::onsummary {
+ const vespalib::string Attribute::NAME("vespa.mutate.on_first_phase.attribute");
+ const vespalib::string Attribute::DEFAULT_VALUE("");
+ const vespalib::string Operation::NAME("vespa.mutate.on_first_phase.operation");
+ const vespalib::string Operation::DEFAULT_VALUE("");
-const vespalib::string Attribute::NAME("vespa.execute.onsummary.attribute");
-const vespalib::string Attribute::DEFAULT_VALUE("");
-const vespalib::string Operation::NAME("vespa.execute.onsummary.operation");
-const vespalib::string Operation::DEFAULT_VALUE("");
+ vespalib::string
+ Attribute::lookup(const Properties &props, const vespalib::string &defaultValue) {
+ return lookupString(props, NAME, defaultValue);
+ }
+
+ vespalib::string
+ Operation::lookup(const Properties &props, const vespalib::string &defaultValue) {
+ return lookupString(props, NAME, defaultValue);
+ }
-vespalib::string
-Attribute::lookup(const Properties &props, const vespalib::string & defaultValue) {
- return lookupString(props, NAME, defaultValue);
}
+namespace on_second_phase {
+
+ const vespalib::string Attribute::NAME("vespa.mutate.on_second_phase.attribute");
+ const vespalib::string Attribute::DEFAULT_VALUE("");
+ const vespalib::string Operation::NAME("vespa.mutate.on_second_phase.operation");
+ const vespalib::string Operation::DEFAULT_VALUE("");
+
+ vespalib::string
+ Attribute::lookup(const Properties &props, const vespalib::string &defaultValue) {
+ return lookupString(props, NAME, defaultValue);
+ }
+
+ vespalib::string
+ Operation::lookup(const Properties &props, const vespalib::string &defaultValue) {
+ return lookupString(props, NAME, defaultValue);
+ }
-vespalib::string
-Operation::lookup(const Properties &props, const vespalib::string & defaultValue) {
- return lookupString(props, NAME, defaultValue);
}
+namespace on_summary {
+
+ const vespalib::string Attribute::NAME("vespa.mutate.on_summary.attribute");
+ const vespalib::string Attribute::DEFAULT_VALUE("");
+ const vespalib::string Operation::NAME("vespa.mutate.on_summary.operation");
+ const vespalib::string Operation::DEFAULT_VALUE("");
+
+ vespalib::string
+ Attribute::lookup(const Properties &props, const vespalib::string &defaultValue) {
+ return lookupString(props, NAME, defaultValue);
+ }
+
+ vespalib::string
+ Operation::lookup(const Properties &props, const vespalib::string &defaultValue) {
+ return lookupString(props, NAME, defaultValue);
+ }
+
+}
}
namespace summary {
diff --git a/searchlib/src/vespa/searchlib/fef/indexproperties.h b/searchlib/src/vespa/searchlib/fef/indexproperties.h
index 1798ec4d89f..3b8447c2a61 100644
--- a/searchlib/src/vespa/searchlib/fef/indexproperties.h
+++ b/searchlib/src/vespa/searchlib/fef/indexproperties.h
@@ -139,6 +139,66 @@ namespace execute::onsummary {
};
}
+namespace mutate::on_match {
+ struct Attribute {
+ static const vespalib::string NAME;
+ static const vespalib::string DEFAULT_VALUE;
+ static vespalib::string lookup(const Properties &props) { return lookup(props, DEFAULT_VALUE); }
+ static vespalib::string lookup(const Properties &props, const vespalib::string & defaultValue);
+ };
+ struct Operation {
+ static const vespalib::string NAME;
+ static const vespalib::string DEFAULT_VALUE;
+ static vespalib::string lookup(const Properties &props) { return lookup(props, DEFAULT_VALUE); }
+ static vespalib::string lookup(const Properties &props, const vespalib::string & defaultValue);
+ };
+}
+
+namespace mutate::on_first_phase {
+ struct Attribute {
+ static const vespalib::string NAME;
+ static const vespalib::string DEFAULT_VALUE;
+ static vespalib::string lookup(const Properties &props) { return lookup(props, DEFAULT_VALUE); }
+ static vespalib::string lookup(const Properties &props, const vespalib::string & defaultValue);
+ };
+ struct Operation {
+ static const vespalib::string NAME;
+ static const vespalib::string DEFAULT_VALUE;
+ static vespalib::string lookup(const Properties &props) { return lookup(props, DEFAULT_VALUE); }
+ static vespalib::string lookup(const Properties &props, const vespalib::string & defaultValue);
+ };
+}
+
+namespace mutate::on_second_phase {
+ struct Attribute {
+ static const vespalib::string NAME;
+ static const vespalib::string DEFAULT_VALUE;
+ static vespalib::string lookup(const Properties &props) { return lookup(props, DEFAULT_VALUE); }
+ static vespalib::string lookup(const Properties &props, const vespalib::string & defaultValue);
+ };
+ struct Operation {
+ static const vespalib::string NAME;
+ static const vespalib::string DEFAULT_VALUE;
+ static vespalib::string lookup(const Properties &props) { return lookup(props, DEFAULT_VALUE); }
+ static vespalib::string lookup(const Properties &props, const vespalib::string & defaultValue);
+ };
+}
+
+namespace mutate::on_summary {
+ struct Attribute {
+ static const vespalib::string NAME;
+ static const vespalib::string DEFAULT_VALUE;
+ static vespalib::string lookup(const Properties &props) { return lookup(props, DEFAULT_VALUE); }
+ static vespalib::string lookup(const Properties &props, const vespalib::string & defaultValue);
+ };
+ struct Operation {
+ static const vespalib::string NAME;
+ static const vespalib::string DEFAULT_VALUE;
+ static vespalib::string lookup(const Properties &props) { return lookup(props, DEFAULT_VALUE); }
+ static vespalib::string lookup(const Properties &props, const vespalib::string & defaultValue);
+ };
+}
+
namespace matching {
/**
diff --git a/searchlib/src/vespa/searchlib/fef/ranksetup.cpp b/searchlib/src/vespa/searchlib/fef/ranksetup.cpp
index 19a5a237c7e..80be1299fe7 100644
--- a/searchlib/src/vespa/searchlib/fef/ranksetup.cpp
+++ b/searchlib/src/vespa/searchlib/fef/ranksetup.cpp
@@ -65,9 +65,10 @@ RankSetup::RankSetup(const BlueprintFactory &factory, const IIndexEnvironment &i
_nearest_neighbor_brute_force_limit(0.05),
_global_filter_lower_limit(0.0),
_global_filter_upper_limit(1.0),
- _executeOnMatch(),
- _executeOnReRank(),
- _executeOnSummary()
+ _mutateOnMatch(),
+ _mutateOnFirstPhase(),
+ _mutateOnSecondPhase(),
+ _mutateOnSummary()
{ }
RankSetup::~RankSetup() = default;
@@ -113,12 +114,14 @@ RankSetup::configure()
set_nearest_neighbor_brute_force_limit(matching::NearestNeighborBruteForceLimit::lookup(_indexEnv.getProperties()));
set_global_filter_lower_limit(matching::GlobalFilterLowerLimit::lookup(_indexEnv.getProperties()));
set_global_filter_upper_limit(matching::GlobalFilterUpperLimit::lookup(_indexEnv.getProperties()));
- _executeOnMatch._attribute = execute::onmatch::Attribute::lookup(_indexEnv.getProperties());
- _executeOnMatch._operation = execute::onmatch::Operation::lookup(_indexEnv.getProperties());
- _executeOnReRank._attribute = execute::onrerank::Attribute::lookup(_indexEnv.getProperties());
- _executeOnReRank._operation = execute::onrerank::Operation::lookup(_indexEnv.getProperties());
- _executeOnSummary._attribute = execute::onsummary::Attribute::lookup(_indexEnv.getProperties());
- _executeOnSummary._operation = execute::onsummary::Operation::lookup(_indexEnv.getProperties());
+ _mutateOnMatch._attribute = mutate::on_match::Attribute::lookup(_indexEnv.getProperties());
+ _mutateOnMatch._operation = mutate::on_match::Operation::lookup(_indexEnv.getProperties());
+ _mutateOnFirstPhase._attribute = mutate::on_first_phase::Attribute::lookup(_indexEnv.getProperties());
+ _mutateOnFirstPhase._operation = mutate::on_first_phase::Operation::lookup(_indexEnv.getProperties());
+ _mutateOnSecondPhase._attribute = mutate::on_second_phase::Attribute::lookup(_indexEnv.getProperties());
+ _mutateOnSecondPhase._operation = mutate::on_second_phase::Operation::lookup(_indexEnv.getProperties());
+ _mutateOnSummary._attribute = mutate::on_summary::Attribute::lookup(_indexEnv.getProperties());
+ _mutateOnSummary._operation = mutate::on_summary::Operation::lookup(_indexEnv.getProperties());
}
void
diff --git a/searchlib/src/vespa/searchlib/fef/ranksetup.h b/searchlib/src/vespa/searchlib/fef/ranksetup.h
index fb6d92f4bac..d3120fa7d46 100644
--- a/searchlib/src/vespa/searchlib/fef/ranksetup.h
+++ b/searchlib/src/vespa/searchlib/fef/ranksetup.h
@@ -22,10 +22,10 @@ namespace search::fef {
class RankSetup
{
public:
- struct ExecuteOperation {
+ struct MutateOperation {
public:
- ExecuteOperation() : ExecuteOperation("", "") {}
- ExecuteOperation(vespalib::stringref attribute, vespalib::stringref operation)
+ MutateOperation() : MutateOperation("", "") {}
+ MutateOperation(vespalib::stringref attribute, vespalib::stringref operation)
: _attribute(attribute),
_operation(operation)
{}
@@ -73,9 +73,10 @@ private:
double _nearest_neighbor_brute_force_limit;
double _global_filter_lower_limit;
double _global_filter_upper_limit;
- ExecuteOperation _executeOnMatch;
- ExecuteOperation _executeOnReRank;
- ExecuteOperation _executeOnSummary;
+ MutateOperation _mutateOnMatch;
+ MutateOperation _mutateOnFirstPhase;
+ MutateOperation _mutateOnSecondPhase;
+ MutateOperation _mutateOnSummary;
public:
RankSetup(const RankSetup &) = delete;
RankSetup &operator=(const RankSetup &) = delete;
@@ -432,9 +433,10 @@ public:
*/
void prepareSharedState(const IQueryEnvironment & queryEnv, IObjectStore & objectStore) const;
- const ExecuteOperation & getExecuteOnMatch() const { return _executeOnMatch; }
- const ExecuteOperation & getExecuteOnReRank() const { return _executeOnReRank; }
- const ExecuteOperation & getExecuteOnSummary() const { return _executeOnSummary; }
+ const MutateOperation & getMutateOnMatch() const { return _mutateOnMatch; }
+ const MutateOperation & getMutateOnFirstPhase() const { return _mutateOnFirstPhase; }
+ const MutateOperation & getMutateOnSecondPhase() const { return _mutateOnSecondPhase; }
+ const MutateOperation & getMutateOnSummary() const { return _mutateOnSummary; }
};
}