Using citrus with Postgres

As an open-source project, we want to play well with other open-source projects! When you use citrus, you can choose to integrate it with your own Postgres database.

A lot of vector database solutions typically store vectors and other metadata on their own platform. While citrus supports the same, we also make it possible for developers to have full access to their data. This starts with enabling support for Postgres as a database layer with citrus.

If your application is already using a Postgres database, integrating citrus is easy! citrus manages an efficient vector index while storing all the relevant data on your pre-existing database.

How to get started

Postgres integration is still in beta. Please open issues on GitHub if you encounter any bugs!

We like to keep things simple. So all you need to do to enable Postgres support, is instantiate citrus in the following manner.

client = citrusdb.Client(
    persist_directory="citrus",
    database_type="pg",
    host=PG_HOST,
    port=PG_PORT,
    user=PG_USER,
    password=PG_PASSWORD
)

Every other interaction with the client remains entirely the same! If you're looking to create new indices, insert new vectors or perform semantic search, head over to quick start

Code examples

We're currently pushing hard to release some cool new projects that showcase citrus and also help teach others how to best make use of citrus. If you have any questions, please send us a DM on Twitter!

Last updated