summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahooinc.com>2021-11-05 11:04:28 +0000
committerArne H Juul <arnej@yahooinc.com>2021-11-05 11:04:28 +0000
commite5195d6bbf10e53f56e1b0209385c0d49f6ede0d (patch)
tree5931a20c4323b5c7f7c1d8897c395698d9715a08 /searchlib
parent689d1cbc64916d94aee96b3bf57954baedb3a0bb (diff)
use the other assert
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/engine/proto_converter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/searchlib/src/vespa/searchlib/engine/proto_converter.cpp b/searchlib/src/vespa/searchlib/engine/proto_converter.cpp
index d808b7a2951..e13b17d1146 100644
--- a/searchlib/src/vespa/searchlib/engine/proto_converter.cpp
+++ b/searchlib/src/vespa/searchlib/engine/proto_converter.cpp
@@ -116,8 +116,9 @@ ProtoConverter::search_reply_to_proto(const SearchReply &reply, ProtoSearchReply
}
if (reply.match_features.values.size() > 0) {
size_t num_match_features = reply.match_features.names.size();
+ assert(num_match_features * reply.hits.size() == reply.match_features.values.size());
for (const auto & name : reply.match_features.names) {
- *proto.add_match_feature_names() = name;
+ proto.add_match_feature_names()->assign(name.c_str(), name.size());
}
auto mfv_iter = reply.match_features.values.begin();
for (size_t i = 0; i < reply.hits.size(); ++i) {
@@ -133,7 +134,6 @@ ProtoConverter::search_reply_to_proto(const SearchReply &reply, ProtoSearchReply
}
}
}
- assert(mfv_iter == reply.match_features.values.end());
}
proto.set_grouping_blob(&reply.groupResult[0], reply.groupResult.size());
const auto &slime_trace = reply.propertiesMap.trace().lookup("slime");