aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/queryeval/truesearch.h
blob: 44f0bdbc65da821773c94879628121d086cb902d (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 Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include "searchiterator.h"
#include <vespa/searchlib/fef/termfieldmatchdata.h>

namespace search::queryeval {

/**
 * Search iterator for testing, yielding a hit on all documents.
 * Unpacks (sets docid) to the given TermFieldMatchData.
 **/
class TrueSearch : public SearchIterator
{
private:
    fef::TermFieldMatchData & _tfmd;
    Trinary is_strict() const override { return Trinary::True; }
    void doSeek(uint32_t) override;
    void doUnpack(uint32_t) override;

public:
    TrueSearch(fef::TermFieldMatchData & tfmd);
    ~TrueSearch();
};

}