aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/queryeval/create_blueprint_visitor_helper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'searchlib/src/vespa/searchlib/queryeval/create_blueprint_visitor_helper.cpp')
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/create_blueprint_visitor_helper.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/searchlib/src/vespa/searchlib/queryeval/create_blueprint_visitor_helper.cpp b/searchlib/src/vespa/searchlib/queryeval/create_blueprint_visitor_helper.cpp
index d9338641a39..a2d244250cf 100644
--- a/searchlib/src/vespa/searchlib/queryeval/create_blueprint_visitor_helper.cpp
+++ b/searchlib/src/vespa/searchlib/queryeval/create_blueprint_visitor_helper.cpp
@@ -75,13 +75,12 @@ CreateBlueprintVisitorHelper::handleNumberTermAsText(query::NumberTerm &n)
template <typename WS, typename NODE>
void
CreateBlueprintVisitorHelper::createWeightedSet(std::unique_ptr<WS> bp, NODE &n) {
- FieldSpecList fields;
+ bp->reserve(n.getNumTerms());
for (size_t i = 0; i < n.getNumTerms(); ++i) {
- fields.clear();
- fields.add(bp->getNextChildField(_field));
auto term = n.getAsString(i);
query::SimpleStringTerm node(term.first, n.getView(), 0, term.second); // TODO Temporary
- bp->addTerm(_searchable.createBlueprint(_requestContext, fields, node), term.second.percent());
+ FieldSpec field = bp->getNextChildField(_field);
+ bp->addTerm(_searchable.createBlueprint(_requestContext, field, node), term.second.percent());
}
setResult(std::move(bp));
}