Skip to content

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

Closed

Description

@munhitsu

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

Activity

  1. added this to the 3.3.0 milestone on Aug 8, 2020
  2. locked as resolved and limited conversation to collaborators on Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions