// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "search_context.h" #include "string_matcher.h" #include namespace search { template class EnumStoreT; } namespace search::attribute { class EnumHintSearchContext; /* * StringSearchContext is an abstract base class for search contexts * handling a query term on a string attribute vector. */ class StringSearchContext : public SearchContext, public StringMatcher { protected: using MatcherType = StringMatcher; public: StringSearchContext(const AttributeVector& to_be_searched, std::unique_ptr query_term, bool cased, vespalib::FuzzyMatchingAlgorithm fuzzy_matching_algorithm); StringSearchContext(const AttributeVector& to_be_searched, StringMatcher&& matcher); StringSearchContext(StringSearchContext &&) noexcept; ~StringSearchContext() override; const QueryTermUCS4* queryTerm() const override; bool valid() const override; void setup_enum_hint_sc(const EnumStoreT& enum_store, EnumHintSearchContext& enum_hint_sc); }; }