Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Este documento mostra como usar embeddings armazenados para gerar índices e embeddings de consulta. Para mais informações sobre como armazenar embeddings, consulte
Armazenar embeddings de vetor.
É possível criar índices ScaNN, IVF, IVFFlat e HNSW com o AlloyDB.
Antes de começar
Antes de começar a criar índices, conclua os seguintes
pré-requisitos.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-04-11 UTC."],[[["\u003cp\u003eThis guide outlines how to generate indexes and query embeddings using stored embeddings in AlloyDB.\u003c/p\u003e\n"],["\u003cp\u003eAlloyDB supports the creation of \u003ccode\u003eScaNN\u003c/code\u003e, \u003ccode\u003eIVF\u003c/code\u003e, \u003ccode\u003eIVFFlat\u003c/code\u003e, and \u003ccode\u003eHNSW\u003c/code\u003e index types, each requiring a unique name within the database.\u003c/p\u003e\n"],["\u003cp\u003eBefore creating indexes, you need to ensure that embedding vectors are stored in an AlloyDB table and the \u003ccode\u003evector\u003c/code\u003e extension (version 0.5.0 or later) is installed.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ealloydb_scann\u003c/code\u003e extension is necessary for generating \u003ccode\u003eScaNN\u003c/code\u003e indexes and is compatible with PostgreSQL 14 and 15.\u003c/p\u003e\n"],["\u003cp\u003eUsers upgrading to AlloyDB Omni must drop any \u003ccode\u003epostgres_ann\u003c/code\u003e indexes, upgrade, and then recreate them using the renamed \u003ccode\u003ealloydb_scann\u003c/code\u003e extension.\u003c/p\u003e\n"]]],[],null,[]]