From: enrico-stauss (@enrico-stauss) <noreply+enrico-stauss@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: [pgvector/pgvector] issue #958: PGVector incompatible with BM42
Date: Fri, 20 Feb 2026 14:24:56 +0000
Message-ID: <gh-pgvector-pgvector-958@github.com> (raw)
I was trying to evaluate whether to move a vector index from Qdrant to a pre-existing Postgres DB with PGVector. Down the road I realized that BM42 uses the full 32bit (signed -> 2^32 - 1) vocabulary size which exceeds the sparsevec limitation of 1_000_000_000.
I just wanted to make you aware of this limitation, it probably is an easy fix (or not) and would enable a new use-case. The documentation on BM42 is admittedly also not vey clear. From [this page](https://qdrant.tech/articles/modern-sparse-neural-retrieval/) I assumed that the vocabulary size would be reflect the underlying BERT tokenizer's vocabulary (30_522) but that does not seem to be the case after my empirical tests.
Hope it helps :)
Kind Regards