4 ms·
Facets are possible in Postgres but it looks complex: https://web.archive.org/web/20200815141031/https://roamanalytics.com/2019/04/16/faceted-search-with-postg
by ashconnor 2y ago
Facets are possible in Postgres but it looks complex:
https://web.archive.org/web/20200815141031/https://roamanalytics.com/2019/04/16/faceted-search-with-postgres-using-tsvector/ https://web.archive.org/web/20200815141031/https://roamanaly...
pg_search [0] not to be confused with the ruby gem of the same name [1]:
[0] - https://github.com/paradedb/paradedb/tree/dev/pg_search#overview https://github.com/paradedb/paradedb/tree/dev/pg_search#over...
[1] - https://github.com/Casecommons/pg_search https://github.com/Casecommons/pg_search
- simonw 2y agoI implemented faceted search on my own blog entirely on top of PostgreSQL. It works well, but that's because my blog has only 11,348 documents total. Notes on how I built that here: https://simonwillison.net/2017/Oct/5/django-postgresql-faceted-search/ https://simonwillison.net/2017/Oct/5/django-postgresql-facet...
- przemub 2y agoThat's a lot of posts for a blog :)
- bdzr 2y agoFaceting over even small result sets and producing the relevant counts is really hard for postgres, and caching tends to be impossible due to the combinatorics of the problem. There's some discussion around supporting better indexing options here that is relevant: https://www.postgresql.org/message-id/CAJqPDh9o%3DoxRP%3DxZhbCzzAs4Vr5hNUkYLMspGee%2B%3DmgbqG3tAg%40mail.gmail.com https://www.postgresql.org/message-id/CAJqPDh9o%3DoxRP%3DxZh.... Practically, https://github.com/cybertec-postgresql/pgfaceting https://github.com/cybertec-postgresql/pgfaceting is the best bet for people who must use postgres even though it still uses a manual maintenance step.