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

#pragma once

#include "single_string_enum_search_context.h"
#include "enumhintsearchcontext.h"
#include <vespa/vespalib/fuzzy/fuzzy_matching_algorithm.h>

namespace search::attribute {

/*
 * SingleStringEnumHintSearchContext handles the creation of search iterators
 * for a query term on a single value string enumerated attribute vector using
 * dictionary information to eliminate searches for nonexisting words.
 */
class SingleStringEnumHintSearchContext : public SingleStringEnumSearchContext,
                                          public EnumHintSearchContext
{
public:
    SingleStringEnumHintSearchContext(std::unique_ptr<QueryTermSimple> qTerm, bool cased,
                                      vespalib::FuzzyMatchingAlgorithm fuzzy_matching_algorithm,
                                      const AttributeVector& toBeSearched,
                                      EnumIndices enum_indices,
                                      const EnumStoreT<const char*>& enum_store,
                                      uint64_t num_values);
    ~SingleStringEnumHintSearchContext() override;
};

}