Allow termwise for weightedset term too.
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "weighted_set_term_blueprint.h"
#include "weighted_set_term_search.h"
-#include <vespa/searchlib/fef/termfieldmatchdata.h>
-#include <vespa/searchlib/queryeval/searchiterator.h>
#include <vespa/vespalib/objects/visit.hpp>
-#include <algorithm>
namespace search {
namespace queryeval {
@@ -17,6 +13,7 @@ WeightedSetTermBlueprint::WeightedSetTermBlueprint(const FieldSpec &field)
_weights(),
_terms()
{
+ set_allow_termwise_eval(true);
}
WeightedSetTermBlueprint::~WeightedSetTermBlueprint()
@@ -45,8 +42,7 @@ WeightedSetTermBlueprint::addTerm(Blueprint::UP term, int32_t weight)
}
SearchIterator::UP
-WeightedSetTermBlueprint::createSearch(search::fef::MatchData &md,
- bool) const
+WeightedSetTermBlueprint::createSearch(search::fef::MatchData &md, bool) const
{
const State &state = getState();
assert(state.numFields() == 1);
