Class: PGVectorStore
Provides support for writing and querying vector data in Postgres. Note: Can't be used with data created using the Python version of the vector store (https://docs.llamaindex.ai/en/stable/examples/vector_stores/postgres.html)
Implements
Constructors
constructor
• new PGVectorStore(config?
): PGVectorStore
Constructs a new instance of the PGVectorStore
If the connectionString
is not provided the following env variables are
used to connect to the DB:
PGHOST=your database host
PGUSER=your database user
PGPASSWORD=your database password
PGDATABASE=your database name
PGPORT=your database port
Parameters
Name | Type | Description |
---|---|---|
config? | Object | The configuration settings for the instance. |
config.connectionString? | string | The connection string (optional). |
config.dimensions? | number | The dimensions of the embedding model. |
config.schemaName? | string | The name of the schema (optional). Defaults to PGVECTOR_SCHEMA. |
config.tableName? | string | The name of the table (optional). Defaults to PGVECTOR_TABLE. |