Skip to content

Document Stores

Document stores contain ingested document chunks, i.e. Nodes.

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

Terminal window
npm i llamaindex @vectorstores/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 "@vectorstores/core";
import { PostgresDocumentStore } from "@vectorstores/postgres";
const storageContext = await storageContextFromDefaults({
docStore: new PostgresDocumentStore(),
});