blob: 1031f3fd44c3370445e1ab18ee6475b29aaea339 (
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "multisearch.h"
#include "blueprint.h"
#include "unpackinfo.h"
#include "searchiterator.h"
namespace search::queryeval {
/**
* Utility used to keep track of which children can be evaluated
* termwise, which children we need to unpack and how to combine the
* termwise and non-termwise parts with each other.
**/
struct TermwiseBlueprintHelper {
private:
MultiSearch::Children termwise_ch;
MultiSearch::Children other_ch;
public:
size_t first_termwise;
UnpackInfo termwise_unpack;
MultiSearch::Children get_termwise_children() { return std::move(termwise_ch); }
MultiSearch::Children get_result() { return std::move(other_ch); }
TermwiseBlueprintHelper(const IntermediateBlueprint &self,
MultiSearch::Children subSearches, UnpackInfo &unpackInfo);
~TermwiseBlueprintHelper();
void insert_termwise(SearchIterator::UP search, bool strict);
};
}
|