If you have added items to the index with the item field, you can retrieve them via get_item():

# IDs of items to retrieve
id = 1

# Retrieve items from the encrypted index
item = index.get_item(id)

print(item)
# Example item
# b'Hello!'

Batched Retrieval

You can also retrieve multiple items at once by passing a list of IDs to get_items():

# IDs of items to retrieve
ids = [1, 2, 3]

# Retrieve items from the encrypted index
items = index.get_items(ids)

print(items)
# Example items
# [b'Hello!', b'World!', b'Cyborg!']

API Reference

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