7 ms·
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
by benpacker 3y ago
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’)*
- wkoszek 3y agoThat 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.
- dekimir 3y agoIf you do that, I can update postgres-searchbox [1] to use it for better frontend experience. [1] https://www.npmjs.com/package/postgres-searchbox https://www.npmjs.com/package/postgres-searchbox