When working with Algolia, you may notice discrepancies or inconsistencies with facet counts and hit counts in your search results. There are several reasons why these issues can occur, and understanding the root cause is key to resolving them. Below is a checklist of common issues, each with a root cause and a link to a detailed article for further reading.
In some cases, multiple factors can contribute to discrepancies in facet and hit counts. We recommend reviewing each scenario below, as more than one may apply to your situation.
Common facet and hit count issues
Issue: The hit count in your API response does not match the count shown in the Algolia dashboard
-
Root cause: Your query parameter excludes the facets parameter
Article: How the facets parameter affects hit count accuracy in Algolia
-
-
Root cause 2: You have set 'after distinct' on an attribute for faceting
-
Root cause 3: You have set 'facetingAfterDistinct' as a query-time parameter on all attributes
-
Root cause 4: You have set 'removeWordsIfNoResults' to All optional.
If you encounter facet or hit count discrepancies, review each of these articles to identify which scenario matches your situation and follow the recommended solutions.