algolia / algoliasearch-rails

AlgoliaSearch integration to your favorite ORM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inconsistent `nbHits` after enabling `paginationLimitedTo`

ehoffmann opened this issue · comments

  • Rails version: 4.2.11.1
  • Algolia Rails integration version: 1.20.3
  • Language Version: 2.3.8p459

Description

After enabling paginationLimitedTo XXX indice's setting, I started to have inconsistent nbHits results while querying in Ruby IndexName.search('test', options).

I've noticed the JS client automatically adds scanDistinctHitsUntilPaginationLimitedTo: true option to get accurate results (For which I found no documentation anywhere)

It will be great if the Ruby client could infer this option by itself, as the JS client does. (I have to force it in Ruby for now, but I don't know if it's future proof)

Thanks for your help