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 (5.0) #10236

Merged
merged 2 commits into from Mar 6, 2022
Merged

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

@calebchiam
Copy link
Contributor Author

Hi @tk0miya, I've applied the fix on the 5.0 branch as requested.

Is there an estimate for when 5.0 will be released? If it's still some time away, it may be worth releasing the fix on the 4.x branch for the time being, since it's an issue that affects many Sphinx docs.

Some other examples out in the wild:

Thank you!

@tk0miya tk0miya added this to the 5.0.0 milestone Mar 6, 2022
@tk0miya
Copy link
Member

tk0miya commented Mar 6, 2022

Thanks! I'll merge this after CI passed.

Is there an estimate for when 5.0 will be released? If it's still some time away, it may be worth releasing the fix on the 4.x branch for the time being, since it's an issue that affects many Sphinx docs.

Now it is planned for the end of April or the beginning of May. I feel it's not far.

@calebchiam
Copy link
Contributor Author

Awesome! Good to hear, and thanks for the hard work.

@tk0miya tk0miya merged commit 262240d into sphinx-doc:master Mar 6, 2022
@tk0miya
Copy link
Member

tk0miya commented Mar 6, 2022

Merged. Thank you for your contribution. Please be patient until the 5.0 release (Spring has come soon!).

tk0miya added a commit that referenced this pull request 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