Configuring VectorChord-BM25

To configure VectorChord-BM25, you need to enable the extension in your Postgres database and perform additional setup.

  1. Preload the library:

    The pg_tokenizer library must be loaded at server start. Add pg_tokenizer to the list of libraries in your postgresql.conf file:

    # Edit your postgresql.conf
    shared_preload_libraries = 'pg_tokenizer,$libdir/dbms_pipe,$libdir/edb_gen,...'
  2. Restart the Postgres server to apply the changes.

  3. Configure the search path:

    To ensure Postgres can locate the necessary catalogs for BM25 and tokenization, update your search_path:

    /usr/edb/as16/bin/psql postgres -c 'SET search_path TO "$user", public, tokenizer_catalog, bm25_catalog;'
  4. Create the extensions:

    To enable VectorChord-BM25, create the extension in the database:

    CREATE EXTENSION IF NOT EXISTS pg_tokenizer CASCADE;
    
    CREATE EXTENSION IF NOT EXISTS vchord_bm25 CASCADE;

    After enabling the extension, you can use the functionality provided by VectorChord-BM25.


Could this page be better? Report a problem or suggest an addition!