summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahooinc.com>2021-10-13 07:47:04 +0000
committerArne H Juul <arnej@yahooinc.com>2021-10-13 10:44:05 +0000
commitb3cd3586b2656e05c40c466bb4a8dd64e1965668 (patch)
treef93dceb9249d06fed783a5d942d1fff06912b000 /searchcore
parent31eb724ec3a7eee0f7e2d2e9a87960a1d730e95c (diff)
just make empty DocsumReply
* also remove now-unused convertLidsToGids
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchview.cpp29
1 files changed, 4 insertions, 25 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchview.cpp b/searchcore/src/vespa/searchcore/proton/server/searchview.cpp
index f12a358ba93..b1e350f0b5e 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchview.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/searchview.cpp
@@ -3,6 +3,8 @@
#include "searchview.h"
#include <vespa/searchcore/proton/docsummary/docsumcontext.h>
#include <vespa/searchlib/engine/searchreply.h>
+#include <vespa/vespalib/data/slime/slime.h>
+
#include <vespa/log/log.h>
LOG_SETUP(".proton.server.searchview");
@@ -75,32 +77,12 @@ hasAnyLidsMoved(const DocsumRequest & request,
}
/**
- * Maps the lids in the reply to gids using the original request.
- **/
-void
-convertLidsToGids(DocsumReply &reply, const DocsumRequest &request)
-{
- LOG_ASSERT(reply.docsums.size() == request.hits.size());
- for (size_t i = 0; i < reply.docsums.size(); ++i) {
- const DocsumRequest::Hit & h = request.hits[i];
- DocsumReply::Docsum & d = reply.docsums[i];
- d.gid = h.gid;
- LOG(spam, "convertLidToGid(DocsumReply): docsum[%zu]: lid(%u) -> gid(%s)", i, h.docid, d.gid.toString().c_str());
- }
-}
-
-/**
* Create empty docsum reply
**/
DocsumReply::UP
-createEmptyReply(const DocsumRequest & request)
+createEmptyReply(const DocsumRequest &)
{
- auto reply = std::make_unique<DocsumReply>();
- for (size_t i = 0; i < request.hits.size(); ++i) {
- reply->docsums.push_back(DocsumReply::Docsum());
- reply->docsums.back().gid = request.hits[i].gid;
- }
- return reply;
+ return std::make_unique<DocsumReply>();
}
}
@@ -131,9 +113,6 @@ SearchView::getDocsums(const DocsumRequest & req)
LOG(debug, "Must refetch docsums since the lids have moved.");
reply = getDocsumsInternal(req);
}
- if ( ! req.useRootSlime()) {
- convertLidsToGids(*reply.first, req);
- }
return std::move(reply.first);
}