aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/test/diskindex/testdiskindex.h
blob: fbaa103770d00173366b9882001dcc8703971c10 (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.
#pragma once

#include <vespa/searchlib/diskindex/diskindex.h>

namespace search {
namespace diskindex {

class TestDiskIndex {
private:
    void buildIndex(const std::string &dir, bool directio,
                    bool fieldEmpty, bool docEmpty, bool wordEmpty);
protected:
    index::Schema _schema;
    std::unique_ptr<DiskIndex> _index;

public:
    TestDiskIndex();
    ~TestDiskIndex();
    DiskIndex & getIndex() { return *_index; }
    void buildSchema();
    void openIndex(const std::string &dir, bool directio, bool readmmap,
                   bool fieldEmpty, bool docEmpty, bool wordEmpty);
};

}
}