What are indexes and why use them?
mainIndexes are heuristic data structures used to optimize query performance for a collection.
While you can query a collection without an index, doing so will emit a Python warning and is extremely slow in production because every query vector must be checked against every single record in the collection. An index pre-computes distances between key points in the vector space, allowing for much faster traversal and searching.
Key constraints:
- Only one index may exist per collection.
- An index optimizes a collection for a specific distance measure.
- Index creation time grows with the number of records and vector dimensions. Expect sub-minute responses for a few thousand records, but several minutes for larger collections.