Live data from Hacker News

Show HN: Retake – Open-Source Hybrid Search for Postgres

github.com

1–10 of 24 posts

Show HN: Retake – Open-Source Hybrid Search for Postgres

#1
Hey HN! We're Phil and Ming, co-founders of Retake (https://github.com/getretake/retake). Retake is an open source tool that adds keyword and semantic (i.e hybrid) search to databases. We’ve started by extending the capabilities of Postgres with an SDK for lightning-fast queries.

We built Retake to fix two issues: keeping vectors in sync with Postgres in real time is difficult, and most vector databases aren’t built for hybrid search.

A quick refresher: “keyword search” refers to a technique where results are scored based on the appearance of exact words or terms. “Semantic search” uses vector embeddings to understand the meaning behind those words. Hybrid search combines these two approaches to enhance the precision and relevance of results.

To implement semantic or hybrid search today, most organizations run batch jobs that update their search engine or vector database using ETL tools or custom data pipelines. We’ve seen from firsthand experience how time-consuming and costly this can be, as moving vectors often requires re-embedding the entire data source.

We’ve also seen how many vector databases lack crucial features of “traditional” search: keyword-based (BM25) search, faceting/aggregations, highlighting, efficient filtering, etc.

Here’s how Retake works - our core is built on top of OpenSearch, which acts as a search engine and vector database. We leverage logical-replication-based Change Data Capture (CDC) to stay in sync with Postgres, so documents and vectors are updated incrementally and in real time. Finally, Python and Typescript SDKs make it easy to integrate Retake into your application. There’s no need to manage separate vector databases and search engines, upload and embed documents, or run expensive reindexing jobs. All you need to think about is writing search queries.

The easiest way to get started with Retake is by running our Docker Compose stack:

  git clone https://github.com/getretake/retake.git
  cd retake/docker && docker compose up
Retake is Apache licensed and our repo is here: https://github.com/getretake/retake. For next steps, see our quick start guide: https://docs.getretake.com/quickstart

We’d love your feedback on our solution to hybrid search. Our focus right now is on nailing the basics, but we’d also love to hear what you think we should focus on next.

Show HN: Retake – Open-Source Hybrid Search for Postgres
github.com

Re: Show HN: Retake – Open-Source Hybrid Search for Postgres

#3
post #2

how often are these batch jobs run? I'm curious to know what the absolute maximum sync frequency can be.

We don't run any batch jobs - Retake streams changes in real time via CDC (change data capture). The only batch job you would need to run is to populate an index when it's first created.

Re: Show HN: Retake – Open-Source Hybrid Search for Postgres

#4
Clever idea, good work!

You asked for feedback: I see opportunities for you to nail the basics, by focusing on the value proposition so business-oriented people understand why/how to buy, and on the the middle-tier architecture so technical people understand that you're akin to OpenSearch with Faiss & vectors that auto-update.

My understanding (and please clarify as you wish) of what I've read on your site is this: you're selling the hosted version for enterprises at a price to be discussed with your sales team, and the architecture is something like this...

  ┌──────────────┐    ┌───────────────┐    ┌──────────────┐
  │Search SDK    │    │Search Engine  │    │Data Source   │
  │• Typescript  │    │• OpenSearch   │    │• Postgres    │
  │• Python      │    │• Faiss, KNN   │    │• MySQL (?)   │
  │• Java (soon) │◀──▶│• Keyword, BM25│◀──▶│• Oracle (?)  │
  │• Go (soon)   │    │• Auto-update  │    │• Mongo (?)   │
  │• Etc.        │    │• Etc.         │    │• Etc.        │
  └──────────────┘    └───────────────┘    └──────────────┘

Re: Show HN: Retake – Open-Source Hybrid Search for Postgres

#6
post #5

How does it differ from ZomboDB?

Good question -- the primary difference is the method of integration with Postgres. ZomboDB is a Postgres extension, which limits their compatibility with Postgres serivces like AWS RDS, while Retake is compatible with any service where you can enable logical replication

Re: Show HN: Retake – Open-Source Hybrid Search for Postgres

#7
post #4

Clever idea, good work! You asked for feedback: I see opportunities for you to nail the basics, by focusing on the value proposition so business-oriented people understand why/how to buy, and on the the middle-tier architecture so technical people understand that you're akin to OpenSearch with Faiss & vectors that auto-update. My understanding (and please clarify as you wish) of what I've read on your site is this: y…

That's a nice diagram! Yeah that's roughly it. We'll be adding support for more sources of truth in the future to expand coverage, like the ones you mention but also NoSQL like MongoDB

Re: Show HN: Retake – Open-Source Hybrid Search for Postgres

#8
post #4

Clever idea, good work! You asked for feedback: I see opportunities for you to nail the basics, by focusing on the value proposition so business-oriented people understand why/how to buy, and on the the middle-tier architecture so technical people understand that you're akin to OpenSearch with Faiss & vectors that auto-update. My understanding (and please clarify as you wish) of what I've read on your site is this: y…

Unrelated to OP, but how did you create that diagram?

Re: Show HN: Retake – Open-Source Hybrid Search for Postgres

#9
post #4

Clever idea, good work! You asked for feedback: I see opportunities for you to nail the basics, by focusing on the value proposition so business-oriented people understand why/how to buy, and on the the middle-tier architecture so technical people understand that you're akin to OpenSearch with Faiss & vectors that auto-update. My understanding (and please clarify as you wish) of what I've read on your site is this: y…

Unrelated to OP, but how did you create that diagram?

  ╔═════════════════════════════════════════════════════╗
  ║                                                     ║
  ║ https://en.wikipedia.org/wiki/Box-drawing_character ║
  ║                                                     ║
  ╚═════════════════════════════════════════════════════╝
:-)

there was a related thread a few days ago: https://news.ycombinator.com/item?id=37040883

you could use https://asciiflow.com/ (web) or https://monodraw.helftone.com/ (mac) to make such diagrams and paste them here.

use the "code" formatting ("Text after a blank line that is indented by two or more spaces") -- see https://news.ycombinator.com/formatdoc

Re: Show HN: Retake – Open-Source Hybrid Search for Postgres

#10
post #7
post #4

Clever idea, good work! You asked for feedback: I see opportunities for you to nail the basics, by focusing on the value proposition so business-oriented people understand why/how to buy, and on the the middle-tier architecture so technical people understand that you're akin to OpenSearch with Faiss & vectors that auto-update. My understanding (and please clarify as you wish) of what I've read on your site is this: y…

That's a nice diagram! Yeah that's roughly it. We'll be adding support for more sources of truth in the future to expand coverage, like the ones you mention but also NoSQL like MongoDB

So are you guys using faiss instead of the vector search of postgres?

I think vespa also supports hybrid search(it can also use late interaction model like colbert). How is retake compared to vespa?

Will retake supports sparse vector models like SPLADE(I heard they solve the vocab mismatch problems of keyword search).

How do you guys implement filtering?

Post reply on HN