Collection Options
The CollectionOption lets you control runtime behavior when creating or opening a collection:
read_only: Opens the collection in read-only mode. Attempts to write will raise an error.Note:
read_onlymust be set toFalsewhen callingcreate_and_open(), since creation requires writing files to disk.enable_mmap: Uses memory-mapped I/O for faster access (default toTrue). This trades slightly higher memory cache usage for improved performance.
import zvec
collection_option = zvec.CollectionOption(read_only=False, enable_mmap=True)