algolia / algolia/instantsearch
facets counts do not follow a clear specification in a multi-index context
- Dominant language
- TypeScript
- Stars
- 4.1k
- Forks
- 553
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 51
Description
**Describe the bug 🐛**
At the moment, when a refinement list refines over multiple indices, it's not clear what the counts should be referring to.
**To Reproduce 🔍**
**I. On your Algolia Dashboard**
1. Create 2 indices `A` and `B`.
2. Populate both indices with records that randomly have `color: red` or `color: blue`.
3. Configure `color` as a facet
**II. In a codesandbox**
1. Create InstantSearch with:
- 1 index widget for `A`
- 1 index widget for `B`
- 1 refinement list for attribute: "color" refining both `A` and `B`
2. Look at the counts
https://codesandbox.io/s/ais-ecommerce-demo-app-3miyg
**Expected behavior 💭**
There should be a clear definition of what counts we should display
**Screenshots 🖥**

One request is indeed fired for every index.

**Environment:**
N/A
Contributor guide
Research direction
Start with the linked CodeSandbox and reproduce the refinement list across indices A and B. Inspect the requests and displayed facet counts, then review the relevant multi-index refinement-list behavior to determine what a consistent count specification would need to cover. Done means the expected counting semantics are documented and the behavior can be verified against them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- search
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100