[FEATURE] Configure max index / time index bytes beyond 512MiB
Author: joshuaclaytonCreated Jul 21, 2026Updated Jul 21, 2026
Labelsenhancement
Feature Description
Allow configuration for byte allocation for, at minimum, index and time index sizes beyond 512MiB.
Problem Statement
For larger mv2 indexes, 512MiB is not a sufficient max for MAX_INDEX_BYTES and MAX_TIME_INDEX_BYTES while maintaining a single mv2 file. Rather than have to split against multiple mv2 files, it would be more convenient to configure this limit.
Proposed Solution
If the const generic via bincode is required (that is, there's no way to switch to a builder that allows the caller to configure index sizes), adding a cargo feature for different index sizes for each max value of the index, e.g. 1GiB, 2GiB, 4GiB, with 512MiB remaining the default.
Example Usage
memvid-core = { default-features = false, features = [
"lex",
"temporal_track",
"parallel_segments",
"max_index_bytes_2gib",
"max_time_index_bytes_2gib",
] }Alternatives Considered
- Adjust the constructor, switching to a builder pattern, that allows for verification of the dynamically-configured value to ensure the value is still wrapped in a
Result. This would require adjustingbincode'swith_limitaway from the const generic, which may have an impact on performance and would require additional benchmarking. - Manage time-based (creation time) sharding within the application and query across multiple shards (effectively, keep memvid as-is and move the operational complexity into the application)
Additional Context
Checklist
- I have searched existing issues/discussions for similar requests
- This feature aligns with Memvid's goals (portable, single-file AI memory)
- I am willing to help implement this feature
Source: memvid/memvid