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

search experience for words word.len < 3 is inconsistent #8069

Closed
munhitsu opened this issue Aug 7, 2020 · 0 comments
Closed

search experience for words word.len < 3 is inconsistent #8069

munhitsu opened this issue Aug 7, 2020 · 0 comments

Comments

@munhitsu
Copy link
Contributor

munhitsu commented Aug 7, 2020

Describe the bug
We have document titled "1st go live". It can be found with "1st", with "live", with "1st live", but search result is empty for "go live" and "1st go live".

It's due to an inconsistency between javascript stemmer and python one.
Javascript accepts short words like "go" and looks for them in the index file. Python however explicitly removes rejects anything shorter than 3 characters.
Well, python implementation is also caveating for unicode and cardinal numbers, but that's not important.

To Reproduce
Steps to reproduce the behavior:

create document with "1st go live" in text
search for "1st go live" 

Expected behavior
find the page either by matching "1st" and "live" or by matching all 3 words "1st", "go", and "live".

Your project
Proposed fix https://github.com/uktrade/sphinx/tree/stemmer-len3

Screenshots
N/A

Environment info

  • OS: Linux & Mac 10.15.6
  • Python version: 3.8.5
  • Sphinx version: 3.1.2 & master
  • Sphinx extensions: n/a
  • Extra tools: n/a

Additional context
N/A

@munhitsu munhitsu mentioned this issue Aug 7, 2020
@tk0miya tk0miya added this to the 3.3.0 milestone Aug 8, 2020
@tk0miya tk0miya closed this as completed Oct 4, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants