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

#pragma once

namespace search::attribute {

/*
 * Class describing how to compact a posting store
 */
class PostingStoreCompactionSpec {
    bool           _btree_nodes; // btree nodes
    bool           _store;       // short arrays, b-tree roots, bitvectors
public:
    PostingStoreCompactionSpec() noexcept
        : _btree_nodes(false),
          _store(false)
    {
    }
    PostingStoreCompactionSpec(bool btree_nodes_, bool store_) noexcept
        : _btree_nodes(btree_nodes_),
          _store(store_)
    {
    }
    bool btree_nodes() const noexcept { return _btree_nodes; }
    bool store() const noexcept { return _store; }
};

}