Index Stores
Index stores are underlying storage components that contain metadata(i.e. information created when indexing) about the index itself.
Available Index Stores
Section titled “Available Index Stores”- SimpleIndexStore: A simple in-memory index store with support for persisting data to disk.
- PostgresIndexStore: A PostgreSQL index store, , see PostgreSQL Storage.
Check the vectorstores Github for the most up to date overview of integrations.
Using PostgreSQL as Index Store
Section titled “Using PostgreSQL as Index Store”npm i llamaindex @vectorstores/postgrespnpm add llamaindex @vectorstores/postgresyarn add llamaindex @vectorstores/postgresbun add llamaindex @vectorstores/postgresYou 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 "@vectorstores/core";import { PostgresIndexStore } from "@vectorstores/postgres";
const storageContext = await storageContextFromDefaults({ indexStore: new PostgresIndexStore(),});