diff options
Diffstat (limited to 'searchlib/src')
-rw-r--r-- | searchlib/src/vespa/searchlib/engine/proto_converter.cpp | 4 |
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"); |