Parser gives confusing response for operator:shortword search
#1 933 ouverte le 26 févr. 2026
Métriques du dépôt
- Stars
- (4 680 étoiles)
- Métriques de merge PR
- (Merge moyen 7j 4h) (20 PRs mergées en 30 j)
Description
I searched for title:xz trying to find the story about the xz backdoor. The mariadb search engine doesn't index two-character words, which app/models/search_parser.rb refers to as shortwords (not stopword - similar context and term, so they're easy to confuse).
But this query is parsed incorrectly:
The :xz is confusing here. Only "xz" is a shortword, and the : should be associated with title. But it's not well-defined to search for a title with an empty string. I'm not sure off the top of my head what the correct parse of this should be, I just know the current one is misleading to the user.
This search should be added to spec/models/search_parser_spec.rb in the "bugs I've seen in prod" describe block.