Anyway to specify the minimum pg_search_rank that should be returned?
The easiest way would be to chain on a call to where.
MyClass.my_search_scope("query").where("pg_search_rank > 0.2")
Other than that I will research good ways to expose the built-in PostgreSQL way of filtering this, which should be more performant.
@elfassy I just wanted to check up, did my solution above work for you?
i might be missing something but that command always returns
PGError: ERROR: column "pg_search_rank" does not exist
Ah ok, I was hoping that you could use a calculated column alias in a WHERE clause, but clearly you cannot. I will look into this further...
+1 for this feature
For the time being I can filter on the front-end as the column is available on the model
Add spec to show how to use rank in WHERE clause
Remove unnecessary #with_pg_search_rank from spec
A recent (still unpublished) change on master makes this possible. eb730f7
You can now add where("pg_search.rank > 0.2") and it should work.
where("pg_search.rank > 0.2")