aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/attribute/multi_term_or_filter_search.h
blob: f9357081d74fe1fb493d6b2aa1cc942016b3426b (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 Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "i_direct_posting_store.h"
#include <vespa/searchlib/queryeval/searchiterator.h>

namespace search::fef { class MatchData; }
namespace search::attribute {

/**
 * Filter iterator on top of low-level posting list iterators or regular search iterators with OR semantics.
 *
 * Used during calculation of global filter for DotProduct and WandTerm.
 */
class MultiTermOrFilterSearch : public queryeval::SearchIterator
{
protected:
    MultiTermOrFilterSearch() = default;
public:
    static std::unique_ptr<SearchIterator> create(std::vector<DocidIterator>&& children);
    static std::unique_ptr<SearchIterator> create(std::vector<DocidIterator>&& children, fef::TermFieldMatchData& tfmd);
    static std::unique_ptr<SearchIterator> create(std::vector<DocidWithWeightIterator>&& children);
    static std::unique_ptr<SearchIterator> create(std::vector<DocidWithWeightIterator>&& children, fef::TermFieldMatchData& tfmd);
    static std::unique_ptr<SearchIterator> create(const std::vector<SearchIterator *>& children,
                                                  std::unique_ptr<fef::MatchData> md);
};

}