Closed Bug 1171313 Opened 9 years ago Closed 9 years ago

Go to file directly if the search string is a complete file name

Categories

(Webtools Graveyard :: DXR, defect)

defect
Not set
normal

Tracking

(firefox41 affected)

RESOLVED FIXED
Tracking Status
firefox41 --- affected

People

(Reporter: TYLin, Assigned: erik)

References

Details

(Whiteboard: es)

Reproduce steps:
1. Open https://dxr.allizom.org
1. Type nsFrame.cpp on the search box.
2. Hit enter.

Actual result:
The stage server returns all the references to nsFrame.cpp.
https://dxr.allizom.org/mozilla-central/search?q=nsFrame.cpp&redirect=true

Expected result:
Go to nsFrame.cpp directly like the production server.
https://dxr.mozilla.org/mozilla-central/source/layout/generic/nsFrame.cpp?from=nsFrame.cpp#1
Blocks: 1127125
Assignee: nobody → erik
Commit pushed to es at https://github.com/mozilla/dxr

https://github.com/mozilla/dxr/commit/268093f4666cfdcf81a6ceea92ce34e9caddad98
Add direct search for exact matches of filenames or trailing path segments. Fixes bug 1171313.

* Introduce a new type of direct searcher than can return LINE-domain results.
* Add a new filename direct searcher that uses it.
* Switch test harness to use url_for() rather than hard-coding URLs.
* Change direct_result_eq(..., None) to mean "returns a FILE-domain direct result" rather than "doesn't return a direct result".
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Commit pushed to master at https://github.com/mozilla/dxr

https://github.com/mozilla/dxr/commit/268093f4666cfdcf81a6ceea92ce34e9caddad98
Add direct search for exact matches of filenames or trailing path segments. Fixes bug 1171313.
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.