// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "direct_posting_store_adapter.h" #include namespace search::attribute { /** * Adapter used to implement a specific IDirectPostingStore interface for * a string attribute vector with underlying posting lists (fast-search). */ template class StringDirectPostingStoreAdapter : public DirectPostingStoreAdapter { public: using LookupKey = typename ParentType::LookupKey; using LookupResult = typename ParentType::LookupResult; StringDirectPostingStoreAdapter(const PostingStoreType& posting_store, const EnumStoreType& enum_store, bool attr_is_filter); LookupResult lookup(const LookupKey& key, vespalib::datastore::EntryRef dictionary_snapshot) const override; void collect_folded(vespalib::datastore::EntryRef enum_idx, vespalib::datastore::EntryRef dictionary_snapshot, const std::function& callback) const override; int64_t get_integer_value(vespalib::datastore::EntryRef enum_idx) const noexcept override; }; }