You can retrieve specific items from the index by their IDs using the get() method:
# IDs of items to retrieve
ids = ["item_20", "item_11"]
include = ["contents", "metadata"]

# Retrieve items from the encrypted index
items = index.get(ids, include)

print(items)
# Example items
# [{"id": "item_20", "contents": "Hello, World!", "metadata": {"type": "txt"}},
#  {"id": "item_11", "contents": "Hello, Cyborg!", "metadata": {"type": "md"}}]

Include Fields

You can specify which fields to include in the response:
  • vector: The vector data itself
  • contents: Text or binary content associated with the vector
  • metadata: Structured metadata object
If you don’t specify include, the default is ["vector", "contents", "metadata"].

API Reference

For more information on getting items from an encrypted index, refer to the API reference: