Logo
Modules/Storage

Index Stores

Index stores are underlying storage components that contain metadata(i.e. information created when indexing) about the index itself.

Available Index Stores

Check the LlamaIndexTS Github for the most up to date overview of integrations.

Using PostgreSQL as Index Store

npm install llamaindex @llamaindex/postgres

You can configure the schemaName, tableName, namespace, and connectionString. If a connectionString is not provided, it will use the environment variables PGHOST, PGUSER, PGPASSWORD, PGDATABASE and PGPORT.

import { Document, VectorStoreIndex, storageContextFromDefaults } from "llamaindex";
import { PostgresIndexStore } from "@llamaindex/postgres";
 
const storageContext = await storageContextFromDefaults({
  indexStore: new PostgresIndexStore(),
});

API Reference

Edit on GitHub

Last updated on

On this page