algolia / algolia/query-suggestions
Duplication of suggestions with empty attributes
- Dominant language
- Ruby
- Stars
- 21
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
A customer is seeing duplicate suggestions in his index. After investigation, the reason is most likely because of empty attributes that are creating a space and thus not _dedup_.
For example, with this config:
```
a + b
a + b + c
```
Data:
```
{ a: "renault", b: "clio", c: "" }
{ a: "renault", b: "clio", c: "3 portes" }
```
You can end up with this result:

Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the duplicate suggestions with the configuration and two data records shown in the issue. Inspect the query-suggestions deduplication behavior around empty attributes; done means equivalent suggestions are not duplicated while distinct values such as “3 portes” remain separate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100