Stay organized with collections
Save and categorize content based on your preferences.
This document shows you how to use stored embeddings to generate indexes and query
embeddings. For more information about storing embedding, see
Store vector embeddings.
You can create ScaNN, IVF, IVFFlat, and HNSW indexes with AlloyDB.
Before you begin
Before you can start creating indexes, you must complete the following
prerequisites.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-26 UTC."],[[["This guide outlines how to generate indexes and query embeddings using stored embeddings in AlloyDB."],["AlloyDB supports the creation of `ScaNN`, `IVF`, `IVFFlat`, and `HNSW` index types, each requiring a unique name within the database."],["Before creating indexes, you need to ensure that embedding vectors are stored in an AlloyDB table and the `vector` extension (version 0.5.0 or later) is installed."],["The `alloydb_scann` extension is necessary for generating `ScaNN` indexes and is compatible with PostgreSQL 14 and 15."],["Users upgrading to AlloyDB Omni must drop any `postgres_ann` indexes, upgrade, and then recreate them using the renamed `alloydb_scann` extension."]]],[]]