// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include #include namespace search::attribute { /** * Read view for the data stored in an extendable multi-value string * array attribute vector (used by streaming visitor) that handles * optional addition of weight. * @tparam MultiValueType The multi-value type of the data to access. */ template class ExtendableStringArrayMultiValueReadView : public attribute::IMultiValueReadView { using Offsets = std::vector>; const std::vector& _buffer; const Offsets & _offsets; const std::vector& _idx; mutable std::vector _copy; public: ExtendableStringArrayMultiValueReadView(const std::vector& buffer, const Offsets & offsets, const std::vector& idx); ~ExtendableStringArrayMultiValueReadView() override; vespalib::ConstArrayRef get_values(uint32_t doc_id) const override; }; }