Description
Description
When using a pagination backend, the total hits is capped at 200. I tried this with will_paginate, but it should also happen with kaminari.
When a pagination backend is set, the limit parameter is set to 200 with no option to override in MeiliSearch::Rails::ClassMethods#ms_search.
Later in the method total hits is calculated by total_hits = json['hits'].length. This is capped at 200 due to the limit set earlier.
total_hits should instead be set to the value of nbHits.
Expected behavior
When more than 200 documents match the search, the total hits count should be match the value returned.
What you expected to happen.
Current behavior
Currently the total number of hits is capped at 200.
Environment (please complete the following information):
- meilisearch-rails version: 0.5.1