summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-11-07 15:53:17 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2023-11-07 19:47:47 +0000
commit1c4d2fd8baab15b998de17afa6db4f4da330e020 (patch)
treeda18e83d923a7c0423dd665d63f604755e35acc8 /searchcore
parent1e8cf6c828048d8ad6d3a0e8c663b9a76db59d19 (diff)
Sameelement behaves like an and with extra constraints.
So it should behave the sameway during fetchPostings too.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp3
-rw-r--r--searchcore/src/tests/proton/matching/query_test.cpp8
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/query.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/query.h3
4 files changed, 9 insertions, 9 deletions
diff --git a/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp b/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp
index f5c9e8baffa..c9951f0b60e 100644
--- a/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp
+++ b/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp
@@ -23,7 +23,6 @@
#include <vespa/vespalib/test/insertion_operators.h>
#include <vespa/vespalib/util/exceptions.h>
#include <vespa/vespalib/util/hw_info.h>
-#include <vespa/vespalib/util/size_literals.h>
#include <vespa/vespalib/util/threadstackexecutor.h>
#include <filesystem>
#include <thread>
@@ -188,7 +187,7 @@ assertWhiteList(const SimpleResult &exp, Blueprint::UP whiteListBlueprint, bool
{
MatchDataLayout mdl;
MatchData::UP md = mdl.createMatchData();
- whiteListBlueprint->fetchPostings(search::queryeval::ExecuteInfo::create(strict));
+ whiteListBlueprint->fetchPostings(search::queryeval::ExecuteInfo::createForTest(strict));
whiteListBlueprint->setDocIdLimit(docIdLimit);
SearchIterator::UP sb = whiteListBlueprint->createSearch(*md, strict);
diff --git a/searchcore/src/tests/proton/matching/query_test.cpp b/searchcore/src/tests/proton/matching/query_test.cpp
index 928e13a9fae..0b87734cec2 100644
--- a/searchcore/src/tests/proton/matching/query_test.cpp
+++ b/searchcore/src/tests/proton/matching/query_test.cpp
@@ -711,7 +711,7 @@ void Test::requireThatQueryGluesEverythingTogether() {
EXPECT_EQUAL(1u, md->getNumTermFields());
query.optimize();
- query.fetchPostings(search::queryeval::ExecuteInfo::create(true, &requestContext.getDoom()));
+ query.fetchPostings(ExecuteInfo::create(true, 1.0F, &requestContext.getDoom()));
SearchIterator::UP search = query.createSearch(*md);
ASSERT_TRUE(search.get());
}
@@ -744,7 +744,7 @@ void checkQueryAddsLocation(const string &loc_in, const string &loc_out) {
MatchData::UP md = mdl.createMatchData();
EXPECT_EQUAL(2u, md->getNumTermFields());
- query.fetchPostings(search::queryeval::ExecuteInfo::create(true, &requestContext.getDoom()));
+ query.fetchPostings(ExecuteInfo::create(true, 1.0F, &requestContext.getDoom()));
SearchIterator::UP search = query.createSearch(*md);
ASSERT_TRUE(search.get());
if (!EXPECT_NOT_EQUAL(string::npos, search->asString().find(loc_out))) {
@@ -966,7 +966,7 @@ Test::requireThatWhiteListBlueprintCanBeUsed()
MatchData::UP md = mdl.createMatchData();
query.optimize();
- query.fetchPostings(search::queryeval::ExecuteInfo::create(true, &requestContext.getDoom()));
+ query.fetchPostings(ExecuteInfo::create(true, 1.0F, &requestContext.getDoom()));
SearchIterator::UP search = query.createSearch(*md);
SimpleResult exp = SimpleResult().addHit(1).addHit(5).addHit(7).addHit(11);
SimpleResult act;
@@ -1129,7 +1129,7 @@ public:
{
set_want_global_filter(want_global_filter);
}
- ~GlobalFilterBlueprint();
+ ~GlobalFilterBlueprint() override;
void set_global_filter(const GlobalFilter& filter_, double estimated_hit_ratio_) override {
filter = filter_.shared_from_this();
estimated_hit_ratio = estimated_hit_ratio_;
diff --git a/searchcore/src/vespa/searchcore/proton/matching/query.cpp b/searchcore/src/vespa/searchcore/proton/matching/query.cpp
index 955cd30714f..00a3f6bab7e 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/query.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/query.cpp
@@ -247,7 +247,7 @@ Query::optimize()
}
void
-Query::fetchPostings(const search::queryeval::ExecuteInfo & executeInfo)
+Query::fetchPostings(const ExecuteInfo & executeInfo)
{
_blueprint->fetchPostings(executeInfo);
}
@@ -265,7 +265,7 @@ Query::handle_global_filter(const vespalib::Doom & doom, uint32_t docid_limit,
_blueprint = Blueprint::optimize(std::move(_blueprint));
LOG(debug, "blueprint after handle_global_filter:\n%s\n", _blueprint->asString().c_str());
// strictness may change if optimized order changed:
- fetchPostings(search::queryeval::ExecuteInfo::create(true, &doom));
+ fetchPostings(ExecuteInfo::create(true, 1.0F, &doom));
}
bool
diff --git a/searchcore/src/vespa/searchcore/proton/matching/query.h b/searchcore/src/vespa/searchcore/proton/matching/query.h
index c2d2d389d2c..1b5d6dbca60 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/query.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/query.h
@@ -23,6 +23,7 @@ class Query
private:
using Blueprint = search::queryeval::Blueprint;
using GlobalFilter = search::queryeval::GlobalFilter;
+ using ExecuteInfo = search::queryeval::ExecuteInfo;
search::query::Node::UP _query_tree;
Blueprint::UP _blueprint;
Blueprint::UP _whiteListBlueprint;
@@ -98,7 +99,7 @@ public:
* test to verify the original query without optimization.
**/
void optimize();
- void fetchPostings(const search::queryeval::ExecuteInfo & executeInfo) ;
+ void fetchPostings(const ExecuteInfo & executeInfo) ;
void handle_global_filter(const vespalib::Doom & doom, uint32_t docid_limit,
double global_filter_lower_limit, double global_filter_upper_limit,