Ask a question to get started
Enter to send•Shift+Enter new line
PutOp()
NamedTuple
Hierarchical path that identifies the location of the item.
The namespace acts as a folder-like structure to organize items. Each element in the tuple represents one level in the hierarchy.
Root level documents:
("documents",)
User-specific documents:
("documents", "user123")
Nested cache structure:
("cache", "embeddings", "v1")
Unique identifier for the item within its namespace.
The key must be unique within the specific namespace to avoid conflicts. Together with the namespace, it forms a complete path to the item.
The data to store, or None to mark the item for deletion.
None
The value must be a dictionary with string keys and JSON-serializable values. Setting this to None signals that the item should be deleted.
Controls how the item's fields are indexed for search operations.
Controls the TTL (time-to-live) for the item in minutes.
If provided, and if the store you are using supports this feature, the item will expire this many minutes after it was last accessed. The expiration timer refreshes on both read operations (get/search) and write operations (put/update). When the TTL expires, the item will be scheduled for deletion on a best-effort basis. Defaults to None (no expiration).
Operation to store, update, or delete an item in the store.
This class represents a single operation to modify the store's contents, whether adding new items, updating existing ones, or removing them.