Teaching Postgres to Facet Like Elasticsearch
4 points
1 day ago
| 1 comment
| paradedb.com
| HN
jamesgresql
1 day ago
[-]
Hey HN! Author here. We added faceted search capabilities to our `pg_search` extension for Postgres, which is built on Tantivy (Rust's answer to Lucene). This brings Elasticsearch-style faceting directly into Postgres with a 14x performance improvement over a CTE based approach by performing facet aggregations in a single BM25 index pass and making use of our columnar store.

You get the same faceting features you'd expect from a dedicated search engine while maintaining full ACID compliance. Happy to answer technical questions about the implementation!

reply
PSeitz
18 hours ago
[-]
Hi, tantivy dev here. There are two recent performance improvements in tantivy, which should make term aggregations considerable faster.

https://github.com/quickwit-oss/tantivy/pull/2740 https://github.com/quickwit-oss/tantivy/pull/2759

reply
stuhood
5 hours ago
[-]
Yes, thank you for your hard work! We rebased recently, and we'll likely talk about those improvements as part of our `0.21.x` release.
reply