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

#pragma once

#include "attributesaver.h"
#include "save_utils.h"

namespace search::attribute { class MultiValueMappingBase; }

namespace search {

/*
 * Base class for saving a multivalue attribute (e.g. weighted set of int).
 */
class MultiValueAttributeSaver : public AttributeSaver
{
protected:
    using GenerationHandler = vespalib::GenerationHandler;
    using MvMappingBase = attribute::MultiValueMappingBase;
    attribute::EntryRefVector _frozenIndices;

public:
    MultiValueAttributeSaver(GenerationHandler::Guard &&guard,
                             const attribute::AttributeHeader &header,
                             const MvMappingBase &mvMapping);

    virtual ~MultiValueAttributeSaver();
};


} // namespace search