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

#pragma once

#include <vespa/vespalib/util/executor.h>
#include <vector>

namespace search::memoryindex {

class FieldInverter;
class InvertContext;
class UrlFieldInverter;

/*
 * Task to remove a document from a set of field inverters and uri
 * field inverters.
 */
class RemoveTask : public vespalib::Executor::Task
{
    const InvertContext&                                  _context;
    const std::vector<std::unique_ptr<FieldInverter>>&    _inverters;
    const std::vector<std::unique_ptr<UrlFieldInverter>>& _uri_inverters;
    std::vector<uint32_t>                                 _lids;
public:
    RemoveTask(const InvertContext& context, const std::vector<std::unique_ptr<FieldInverter>>& inverters,  const std::vector<std::unique_ptr<UrlFieldInverter>>& uri_inverters, const std::vector<uint32_t>& lids);
    ~RemoveTask() override;
    void run() override;
};

}