News for hackers. Stuff that matters.
Re:Pg_bm25: Elastic-Quality Full Text Search Inside Postgres by benpacker on Sunday October 08, 2023 @03:56PM (#37813868)
I’m not sure if Postgres could support that type of operation directly via count() since I don’t know if the fact that no other filters are present is available to the Index Access Method API.

It might be possible to do a separate function though, like:

select pg_bm25_direct_count(‘term’)*

Re:Pg_bm25: Elastic-Quality Full Text Search Inside Postgres by dekimir on Sunday October 08, 2023 @04:27PM (#37814113)
If you do that, I can update postgres-searchbox [1] to use it for better frontend experience.

[1] https://www.npmjs.com/package/postgres-searchbox

Re:Pg_bm25: Elastic-Quality Full Text Search Inside Postgres by wkoszek on Sunday October 08, 2023 @03:59PM (#37813903)
That would be fine--basically any way of achieving it would be fine. As of now, in PostgreSQL's FTS, I don't think there's any way to do this fast enough to give it back to the user.