pmatseykanets / laravel-scout-postgres

PostgreSQL Full Text Search Engine for Laravel Scout
MIT License
159 stars 36 forks source link

Score for rows #45

Open ahmdkamal opened 3 years ago

ahmdkamal commented 3 years ago

how do I know the score for each row?

devNoiseConsulting commented 2 years ago

Getting a score for a row is pretty Postgres specific. It looks like it could be calculated with ts_rank() or ts_rank_cd(), but I'm not sure how you work that into the model or eloquent query.

https://www.postgresql.org/docs/9.5/textsearch-controls.html#TEXTSEARCH-RANKING https://bigmachine.io/2019/10/29/fine-tuning-full-text-search-with-postgresql-12/