Page MenuHomePhabricator

Search does not warn when searching strings too short to index, and fails to find them
Closed, ResolvedPublic

Description

In phabricator.wikimedia.org I search for: KB

Expected result:

The search finds the task T125316.

Observed result:

"No results found for this query."

It would be nice to fix that bug.

Thank you.

Nnemo


This happens because we cutoff words shorter than 3 characters (or 4? I can't remember offhand. It's 3 or 4. Anyway...). Ideally, Phab could let you know that you've searched something we couldn't even index to begin with, and provide a more informative error message.

Event Timeline

Nnemo created this task.Feb 3 2016, 4:43 PM
Nnemo raised the priority of this task from to Needs Triage.
Nnemo updated the task description. (Show Details)
Nnemo added a project: Phabricator.
Nnemo added a subscriber: Nnemo.
Restricted Application added subscribers: StudiesWorld, Luke081515, scfc, Aklapper. · View Herald TranscriptFeb 3 2016, 4:43 PM
Nnemo awarded a token.Feb 3 2016, 4:43 PM
mmodell added a subscriber: mmodell.Feb 3 2016, 6:36 PM

Search does not respond to two-character words, as far as I know, due to the behavior of mysql. I don't think we can easily change that.

Aklapper triaged this task as Lowest priority.Feb 3 2016, 6:50 PM

Two letter words are not indexed - too short. I don't think we will fix this.

Aklapper renamed this task from Find the expected tasks to Search does not index two letter words.Feb 3 2016, 6:51 PM
Aklapper set Security to None.
mmodell closed this task as Declined.Feb 3 2016, 6:58 PM
mmodell claimed this task.
scfc reopened this task as Open.Feb 3 2016, 7:19 PM

The title change hides the issue: The user searches for "KB", and instead of the helpful information that Phabricator does not index two-letter words, he gets the reply that there we no matches. This induces cognitive dissonance as the user's (true) recollection of tasks containing this word is met with the (false) declaration, by an infallible machine nonetheless, that no such tasks exist.

So if a user enters a two-letter word and his query will never succeed, he should be told so in no uncertain terms as it is absolutely unlikely that this was his intention.

Aklapper removed mmodell as the assignee of this task.Feb 4 2016, 11:04 AM

Upstream patch for this search backend is welcome, I'd guess. :)

Nnemo renamed this task from Search does not index two letter words to Search does not index two letter words and fails to find them.Feb 4 2016, 1:11 PM
Nnemo added a comment.Feb 4 2016, 1:20 PM

If Phab would find the phrase KB, it would be nice. :-)

Phab says "No result found for the phrase KB". This is wrong and misleading.

If Phab would say "I don't know because the phrase KB is shorter than the minimum length 3", it would be less worse.

By the way, what is the minimum length?

Nnemo renamed this task from Search does not index two letter words and fails to find them to Search does not index words of two letters and fails to find them.Feb 4 2016, 1:22 PM

"Display a meaningful and correct message" is an entirely different scope than "Make search index shorter words"...

I still think the task and its original request should be declined, and someone can file a task about improving the displayed message.

demon added a subscriber: demon.Feb 4 2016, 2:58 PM

Or just repurpose this since we're all here :)

demon renamed this task from Search does not index words of two letters and fails to find them to Search does not warn when searching strings too short to index.Feb 4 2016, 3:00 PM
demon updated the task description. (Show Details)

By the way, what is the minimum length?

The minimum length is 3

Nnemo renamed this task from Search does not warn when searching strings too short to index to Search does not warn when searching strings too short to index, and fails to find them.Feb 5 2016, 12:43 PM
Nnemo updated the task description. (Show Details)Feb 5 2016, 12:48 PM
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptMay 23 2016, 6:00 PM
demon removed a subscriber: demon.Mar 9 2017, 9:41 PM
mmodell closed this task as Resolved.Jun 14 2017, 1:18 PM
mmodell claimed this task.

There is no longer a minimum length. You can search for kb or even k and you should be presented with reasonable, possibly even useful results.