⚡ No More Elasticsearch: PolyVector is Officially Released! (3.2x faster hybrid search inside Postgres, 85% less RAM) #52025
am-mar7
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hey everyone! 👋
Like many Postgres & Supabase developers, I have always hated the architectural complexity of spinning up an external Elasticsearch, OpenSearch, or Algolia cluster just to get good hybrid search (keyword + semantic):
We built and open-sourced PolyVector to turn PostgreSQL into a standalone, enterprise-grade search engine with zero external clusters and zero API fees.
💡 How PolyVector Works Inside Postgres
Instead of doing separate queries and slow application-side rank fusion (RRF), PolyVector compiles partial vector searches and length-normalized BM25 full-text search into a single parameterized SQL query:
WHERE field_name = 'title'), keeping indexes compact, cache-hot in RAM, and lightning-fast.ts_rank_cd(fts_doc, query, 32)to eliminate document length bias, matching Elasticsearch BM25 relevance.DISTINCT ONdeduplication.bge-small-en-v1.5384d). Zero third-party API keys, zero rate limits, data never leaves your VPC.📊 Benchmark vs. Elasticsearch 8.x (100,000 Documents)
We evaluated PolyVector against Elasticsearch 8.x Hybrid and native Postgres FTS on an un-cached catalog of 100,000 products:
🚀 Quickstart
Both libraries have 100% feature parity:
TypeScript / Node.js (
npm install polyvector-search)Python (
pip install polyvector-search)📦 Links & Community
Would love to hear your thoughts, feedback, and what kind of search workloads you are running on Postgres!
All reactions