- Create indexes for fast approximate nearest neighbor search
- Configure index build-time parameters for optimal performance
- Enable label-based filtering for precise vector search
- Choose storage layouts for memory optimization or plain storage
-
The index build process can be memory-intensive. Consider increasing
maintenance_work_mem: -
Label values must be within
smallintrange (-32768 to 32767) - Creating indexes on UNLOGGED tables is not currently supported
- Null vectors are not indexed; null labels are treated as empty arrays
Samples
Basic index creation
With custom parameters
With label-based filtering
With storage layout
Syntax
Distance operators
Build-time parameters
For detailed information about each parameter and tuning recommendations, see Index build-time parameters.
To configure query behavior at runtime, see Query-time parameters.