Why nbhit is not the same when using sort filter or reloading page?

I’m using an indice with around 800000 records and 2 replicas for the sort widget, the main index and replicas have the same setting (except for sorting order). When i change the sort value, the nbhits returned should be the same, but in my case it returns a different number each time, even when i reload the search page. I cant figure out what exactly the cause of this. I’m using instantsearch 3.4 in js. Any help would be greatly appreciated.

Hello! Thank you for a detailed description of your issue. Could you send your appID to support@algolia.com with the same subject name so we can figure out the cause?

thank you for the response. It seems like the cause is from my coding. I added some parameters to my instantsearch

searchParameters: {
  facetsRefinements: {
    language: [drupalSettings.path.currentLanguage],
  },
  facetingAfterDistinct: true,
  disjunctiveFacetsRefinements: {
    role: drupalSettings.role
  },
  query: keyword,
},

The problem will occur if i keep disjunctiveFacetsRefinements in my param list. When i remove this param, the nbHit returned is correct. The ‘role’ facet is set from algolia dashboard configuration only. Is there a way to solve the problem w/o removing it?

Hi @pefeto,

I have received your support ticket with your application ID. Would it be possible to create a codesandbox to replicate the issue? We have some starter templates here.