aboutsummaryrefslogtreecommitdiffstats
path: root/searchsummary/src/vespa/searchsummary/docsummary/query_term_filter.h
blob: 54f533243d9e8e6919945f2bbf9103e85127d920 (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
// 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.h"
#include <vespa/vespalib/stllike/hash_set.h>

namespace search::docsummary {

/*
 * Class for checking if query term view indicates that
 * related query term is useful from the perspective of juniper.
 */
class QueryTermFilter : public IQueryTermFilter
{
    using StringSet = vespalib::hash_set<vespalib::string>;
    StringSet _views;
public:
    QueryTermFilter(StringSet views);
    ~QueryTermFilter() override;
    bool use_view(vespalib::stringref view) const override;
};

}