Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing duplicate search results bug #10228

Closed
wants to merge 2 commits into from
Closed

Conversation

calebchiam
Copy link
Contributor

Feature or Bugfix

  • Bugfix

Purpose

Detail

This fix instantiates a hash set to check for whether a result entry has come up previously before including it in the final search result array. Each entry is uniquely represented by a concatenated string of its contents, excluding its score.

Notice that we reverse the array before doing this check, so that in the case of duplicates, the entry with the highest score is kept.

Relates

@tk0miya
Copy link
Member

tk0miya commented Mar 5, 2022

Thank you for your contribution. But we fully rewrote searchtools.js in the master branch. So it would be better to change it on the branch instead of 4.x branch. Could you apply this bug fix to it, please?

@tk0miya tk0miya added this to the 5.0.0 milestone Mar 5, 2022
@calebchiam
Copy link
Contributor Author

Sure, I'll take a look and make a PR soon.

@tk0miya
Copy link
Member

tk0miya commented Mar 6, 2022

I decided to fix this in the 5.0 release (#10236). So I closing this.

@tk0miya tk0miya closed this Mar 6, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants