aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/matching/fakesearchcontext.cpp
blob: 56c3a1c761b244a6b055e34ccf9e8ee662b66857 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "fakesearchcontext.h"
#include <vespa/vespalib/util/testclock.h>


namespace proton::matching {

FakeSearchContext::FakeSearchContext(size_t initialNumDocs)
    : _clock(std::make_unique<vespalib::TestClock>()),
      _doom(_clock->clock(), vespalib::steady_time()),
      _selector(std::make_shared<search::FixedSourceSelector>(0, "fs", initialNumDocs)),
      _indexes(std::make_shared<IndexCollection>(_selector)),
      _attrSearchable(),
      _docIdLimit(initialNumDocs)
{
    _attrSearchable.is_attr(true);
}

FakeSearchContext::~FakeSearchContext() = default;

}