aboutsummaryrefslogtreecommitdiffstats
path: root/searchsummary/src/vespa/searchsummary/docsummary/query_term_filter_factory.h
blob: 9f914dd1ec1ee39df51a20a22a782d0863d80bfd (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include "i_query_term_filter_factory.h"
#include <vespa/searchcommon/common/schema.h>
#include <vespa/vespalib/stllike/hash_map.h>
#include <vector>

namespace search::index { class Schema; }

namespace search::docsummary {

/*
 * Class for creating an instance of IQueryTermFilter.
 */
class QueryTermFilterFactory : public IQueryTermFilterFactory
{
    vespalib::hash_map<vespalib::string, std::vector<vespalib::string>> _view_map;
public:
    QueryTermFilterFactory(const search::index::Schema& schema);
    ~QueryTermFilterFactory() override;
    std::shared_ptr<const IQueryTermFilter> make(vespalib::stringref input_field) const override;
};

}