// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "multi_enum_search_context.h" #include "attributeiterators.hpp" #include namespace search::attribute { template MultiEnumSearchContext::MultiEnumSearchContext(typename BaseSC::MatcherType&& matcher, const AttributeVector& toBeSearched, MultiValueMappingReadView mv_mapping_read_view, const EnumStoreT& enum_store) : BaseSC(toBeSearched, std::move(matcher)), _mv_mapping_read_view(mv_mapping_read_view), _enum_store(enum_store) { } template std::unique_ptr MultiEnumSearchContext::createFilterIterator(fef::TermFieldMatchData* matchData, bool strict) { if (!this->valid()) { return std::make_unique(); } if (this->getIsFilter()) { return strict ? std::make_unique>(*this, matchData) : std::make_unique>(*this, matchData); } return strict ? std::make_unique>(*this, matchData) : std::make_unique>(*this, matchData); } template uint32_t MultiEnumSearchContext::get_committed_docid_limit() const noexcept { return _mv_mapping_read_view.get_committed_docid_limit(); } }