summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-06-28 09:33:42 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2021-06-28 09:55:49 +0000
commitbdae7fb511e1d369089578bd0307044905d2bbb6 (patch)
tree658a79defc8894673272e24d863d925bfed880e1 /searchlib
parent51b4f15b25068cab7eff193046cb9f18512f4a84 (diff)
GC unused members from SearchReply
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/engine/docsumreply.h7
-rw-r--r--searchlib/src/vespa/searchlib/engine/docsumrequest.cpp1
-rw-r--r--searchlib/src/vespa/searchlib/engine/docsumrequest.h6
-rw-r--r--searchlib/src/vespa/searchlib/engine/searchreply.cpp28
-rw-r--r--searchlib/src/vespa/searchlib/engine/searchreply.h16
-rw-r--r--searchlib/src/vespa/searchlib/engine/tracereply.h14
6 files changed, 17 insertions, 55 deletions
diff --git a/searchlib/src/vespa/searchlib/engine/docsumreply.h b/searchlib/src/vespa/searchlib/engine/docsumreply.h
index 0150b1eda3d..9e9acd0e498 100644
--- a/searchlib/src/vespa/searchlib/engine/docsumreply.h
+++ b/searchlib/src/vespa/searchlib/engine/docsumreply.h
@@ -18,13 +18,12 @@ struct DocsumReply
using Blob = vespalib::MallocPtr;
struct Docsum {
- uint32_t docid;
document::GlobalId gid;
Blob data;
- Docsum() noexcept : docid(0), gid(), data(0) {}
- Docsum(document::GlobalId gid_) noexcept : docid(0), gid(gid_), data(0) { }
- Docsum(document::GlobalId gid_, const char *buf, uint32_t len) noexcept : docid(0), gid(gid_), data(len) {
+ Docsum() noexcept : gid(), data(0) {}
+ Docsum(document::GlobalId gid_) noexcept : gid(gid_), data(0) { }
+ Docsum(document::GlobalId gid_, const char *buf, uint32_t len) noexcept : gid(gid_), data(len) {
memcpy(data.str(), buf, len);
}
Docsum & setData(const char *buf, uint32_t len) {
diff --git a/searchlib/src/vespa/searchlib/engine/docsumrequest.cpp b/searchlib/src/vespa/searchlib/engine/docsumrequest.cpp
index 31ee88d3d69..69e3e721f8e 100644
--- a/searchlib/src/vespa/searchlib/engine/docsumrequest.cpp
+++ b/searchlib/src/vespa/searchlib/engine/docsumrequest.cpp
@@ -14,7 +14,6 @@ DocsumRequest::DocsumRequest(bool useRootSlime_)
DocsumRequest::DocsumRequest(RelativeTime relativeTime, bool useRootSlime_)
: Request(std::move(relativeTime)),
- _flags(0u),
resultClassName(),
_useRootSlime(useRootSlime_),
hits()
diff --git a/searchlib/src/vespa/searchlib/engine/docsumrequest.h b/searchlib/src/vespa/searchlib/engine/docsumrequest.h
index 4849fda8629..b34eebea0e9 100644
--- a/searchlib/src/vespa/searchlib/engine/docsumrequest.h
+++ b/searchlib/src/vespa/searchlib/engine/docsumrequest.h
@@ -19,16 +19,14 @@ public:
class Hit {
public:
- Hit() noexcept : gid(), docid(0), path(0) {}
- Hit(const document::GlobalId & gid_) noexcept : gid(gid_), docid(0), path(0) {}
+ Hit() noexcept : gid(), docid(0) {}
+ Hit(const document::GlobalId & gid_) noexcept : gid(gid_), docid(0) {}
document::GlobalId gid;
mutable uint32_t docid; // converted in backend
- uint32_t path; // wide
};
public:
- uint32_t _flags;
vespalib::string resultClassName;
private:
const bool _useRootSlime;
diff --git a/searchlib/src/vespa/searchlib/engine/searchreply.cpp b/searchlib/src/vespa/searchlib/engine/searchreply.cpp
index 7fc0ac81289..f5dfe5762cc 100644
--- a/searchlib/src/vespa/searchlib/engine/searchreply.cpp
+++ b/searchlib/src/vespa/searchlib/engine/searchreply.cpp
@@ -5,35 +5,27 @@
namespace search::engine {
SearchReply::SearchReply()
- : valid(true),
- offset(0),
- _distributionKey(0),
+ : _distributionKey(0),
totalHitCount(0),
- maxRank(0),
sortIndex(),
sortData(),
groupResult(),
coverage(),
- useWideHits(false),
hits(),
request()
{ }
SearchReply::~SearchReply() = default;
-SearchReply::SearchReply(const SearchReply &rhs) :
- valid (rhs.valid),
- offset (rhs.offset),
- _distributionKey (rhs._distributionKey),
- totalHitCount(rhs.totalHitCount),
- maxRank (rhs.maxRank),
- sortIndex (rhs.sortIndex),
- sortData (rhs.sortData),
- groupResult (rhs.groupResult),
- coverage (rhs.coverage),
- useWideHits (rhs.useWideHits),
- hits (rhs.hits),
- request() // NB not copied
+SearchReply::SearchReply(const SearchReply &rhs)
+ : _distributionKey (rhs._distributionKey),
+ totalHitCount(rhs.totalHitCount),
+ sortIndex (rhs.sortIndex),
+ sortData (rhs.sortData),
+ groupResult (rhs.groupResult),
+ coverage (rhs.coverage),
+ hits (rhs.hits),
+ request() // NB not copied
{ }
}
diff --git a/searchlib/src/vespa/searchlib/engine/searchreply.h b/searchlib/src/vespa/searchlib/engine/searchreply.h
index 531f94d2b6f..f4999d79ada 100644
--- a/searchlib/src/vespa/searchlib/engine/searchreply.h
+++ b/searchlib/src/vespa/searchlib/engine/searchreply.h
@@ -18,14 +18,9 @@ public:
class Hit
{
public:
- Hit() noexcept : gid(), metric(0), path(0), _distributionKey(0) {}
- void setDistributionKey(uint32_t key) { _distributionKey = key; }
- uint32_t getDistributionKey() const { return _distributionKey; }
+ Hit() noexcept : gid(), metric(0) {}
document::GlobalId gid;
search::HitRank metric;
- uint32_t path; // wide
- private:
- int32_t _distributionKey; // wide
};
class Coverage {
@@ -65,21 +60,14 @@ public:
uint16_t _nodesReplied;
};
- // set to false to indicate 'talk to the hand' behavior
- bool valid;
-
- // normal results
- uint32_t offset;
private:
- uint32_t _distributionKey;
+ uint32_t _distributionKey;
public:
uint64_t totalHitCount;
- search::HitRank maxRank;
std::vector<uint32_t> sortIndex;
std::vector<char> sortData;
vespalib::Array<char> groupResult;
Coverage coverage;
- bool useWideHits;
std::vector<Hit> hits;
PropertiesMap propertiesMap;
diff --git a/searchlib/src/vespa/searchlib/engine/tracereply.h b/searchlib/src/vespa/searchlib/engine/tracereply.h
deleted file mode 100644
index 32de6e6e6eb..00000000000
--- a/searchlib/src/vespa/searchlib/engine/tracereply.h
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#pragma once
-
-#include "propertiesmap.h"
-
-namespace search::engine {
-
-struct TraceReply
-{
- PropertiesMap propertiesMap;
-};
-
-}
-