Closed Bug 1156465 Opened 9 years ago Closed 3 years ago

Searching for <3-char strings returns all lines

Categories

(Webtools Graveyard :: DXR, defect)

x86
macOS
defect
Not set
normal

Tracking

(firefox40 affected)

RESOLVED WONTFIX
Tracking Status
firefox40 --- affected

People

(Reporter: erik, Unassigned)

Details

(Whiteboard: easy)

(This bug is for the es branch.)

Hitting Return to force a search for a shorter string than 3 chars causes all lines in the project to be returned. That's not useful. Since we can't do such a search with our trigram indexing, let's just refuse to do the search altogether, mirroring our AJAX search behavior when 2 chars are entered (which shows a bubble explaining that at least 3 chars are required to do a search).
Whiteboard: easy
Can't reproduce any more, did we fix this in https://github.com/mozilla/dxr/pull/422?
Status: NEW → UNCONFIRMED
Ever confirmed: false
Flags: needinfo?(erik)
It is likely. Hooray for fewer code paths. And thanks for the ticket gardening, Peter! :-D
Flags: needinfo?(erik)
We can rank all the words by their tf-idf values and for a query with <3-chars we can return the one with highest tf-idf corresponding to that word. Tf-idf matrix of words ranks popular words in a document so any words which are close to the characters entered and have highest tf-idf can be returned.

DXR is no longer available. Searchfox is now replacing it.
See meta bug 1669906 & https://groups.google.com/g/mozilla.dev.platform/c/jDRjrq3l-CY for more details.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.