5. Batch Operations¶
Estimated time: 8 minutes
Learn how to add and search multiple vectors efficiently.
Steps¶
- Batch add data:
index.add(data, ids)
- Batch search:
queries = np.random.rand(10, 128).astype(np.float32) results = index.batch_search(queries, k=5) print(results)