blob: 8a07ee808ede0dddad7fe9909ccfb1b18a9de4e0 (
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
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "matchdatalayout.h"
#include <cassert>
namespace search::fef {
MatchDataLayout::MatchDataLayout()
: _fieldIds()
{
}
MatchDataLayout::~MatchDataLayout() = default;
MatchData::UP
MatchDataLayout::createMatchData() const
{
auto md = std::make_unique<MatchData>(MatchData::params().numTermFields(_fieldIds.size()));
for (size_t i = 0; i < _fieldIds.size(); ++i) {
md->resolveTermField(i)->setFieldId(_fieldIds[i]);
}
return md;
}
}
|