pmatseykanets / laravel-scout-postgres

PostgreSQL Full Text Search Engine for Laravel Scout
MIT License
161 stars 38 forks source link

add getTotalCount #2

Closed JasonMer1 closed 8 years ago

JasonMer1 commented 8 years ago

I was receiving this error

Class ScoutEngines\Postgres\PostgresEngine contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Laravel\Scout\Engines\Engine::getTotalCount)

Adding this to the PostgresEngine fixed it.

pmatseykanets commented 8 years ago

Thanks for bringing this up. The implementation though is a bit more involved than was proposed in the PR. getTotalCount() should return the overall number of records regardless of the LIMIT clause applied with take() in order to support the length aware pagination. I just tagged 0.2.0 with the implementation.

Please let me know if you have any questions and thanks again.