Open Bug 1156465 Opened 5 years ago Updated Last year

Searching for <3-char strings returns all lines

Categories

(Webtools :: DXR, defect)

x86
macOS
defect
Not set

Tracking

(firefox40 affected)

UNCONFIRMED
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.
You need to log in before you can comment on or make changes to this bug.