blob: 59315070765d0ff6025a62717b442f1f43420fb2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "term.h"
#include <cassert>
namespace search::query {
Term::~Term() = default;
Term::Term(vespalib::stringref view, int32_t id, Weight weight) :
_view(view),
_id(id),
_weight(weight),
_ranked(true),
_position_data(true)
{ }
void Term::setStateFrom(const Term& other) {
setRanked(other.isRanked());
setPositionData(other.usePositionData());
// too late to copy this state:
assert(_view == other.getView());
assert(_id == other.getId());
assert(_weight == other.getWeight());
}
}
|