aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/grouping/groupandcollectengine.cpp
blob: 318d6aaf45def17715e9df0df743854216b1e2d3 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "groupandcollectengine.h"

namespace search {

using namespace expression;
using namespace aggregation;

namespace grouping {

GroupAndCollectEngine::GroupAndCollectEngine(const GroupingLevel * request, size_t level, GroupEngine * nextEngine, bool frozen) :
    GroupEngine(request, level, nextEngine, frozen)
{
}

GroupAndCollectEngine::~GroupAndCollectEngine()
{
}

GroupRef
GroupAndCollectEngine::group(Children & children, uint32_t docId, double rank)
{
    GroupRef gr(GroupEngine::group(children, docId, rank));
    if (gr.valid()) {
        collect(gr, docId, rank);
    }
    return gr;
}

void
GroupAndCollectEngine::group(uint32_t docId, double rank)
{
    GroupEngine::group(docId, rank);
    collect(GroupRef(0), docId, rank);
}

GroupRef
GroupAndCollectEngine::createGroup(const search::expression::ResultNode & v)
{
    GroupRef gr(GroupEngine::createGroup(v));
    createCollectors(gr);
    return gr;
}

}
}

// this function was added by ../../forcelink.sh
void forcelink_file_searchlib_grouping_groupandcollectengine() {}