From 862648206dcfe4680071a4334ac7ebca180b14c6 Mon Sep 17 00:00:00 2001 From: Ash Vardanian <1983160+ashvardanian@users.noreply.github.com> Date: Sat, 3 Aug 2024 01:20:15 +0000 Subject: [PATCH] Docs: Index header has no capacity The lack of capacity data is intended. Reserving memory is a non-persistent operation by nature, and we shouldn't save that metadata on the disk. Closes #452 Co-authored-by: Christopher Yim <4638193+GoodKnight@users.noreply.github.com> --- include/usearch/index.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/usearch/index.hpp b/include/usearch/index.hpp index f1a5199a..3136c6fb 100644 --- a/include/usearch/index.hpp +++ b/include/usearch/index.hpp @@ -1849,6 +1849,14 @@ class memory_mapped_file_t { } }; +/** + * @brief Metadata header for the serialized index. + * + * This structure is very minimalistic by design. It contains no information + * about the capacity of the index, so you'll have to `reserve` after loading. + * It also contains no info on the metric or key types, so you'll have to store + * that information elsewhere, like we do in `index_dense_head_t`. + */ struct index_serialized_header_t { std::uint64_t size = 0; std::uint64_t connectivity = 0;