Multiget also works efficiently when provided with a generator or list. It actually stream-writes and reads from the embedding store. However, when doing a large read from or reading a space in full the Snapshot interface should be preferred.
A consistent snapshot can be created from a Space. The snapshot can also be written to and essentially treated as a fork of a space. There are many use cases of snapshots, a common one is to create a local in-memory snapshot of a space to be used in training.
A local snapshot fulfils the nearest neighbor and key-value store interfaces to be dropped into code that expects a Space.
For brevity you can also create a snapshot when retrieving a space.
Nearest Neighbor Interface
A space allows for the nearest neighbors of an embedding to be retrieved. There are two ways to do so, via a key or via a vector. You can use a key if you want the nearest neighbors of an embedding that is stored in the space.
You can use a vector when you want to find the nearest neighbors of an embedding that is not stored in the space.