Closed Bug 1459188 Opened 6 years ago Closed 1 year ago

Relevant pages are excluded from results in favor of less relevant results from tests when limited to 1000 results (mobile/**/browser.js)

Categories

(Webtools :: Searchfox, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kats, Assigned: asuth)

Details

https://searchfox.org/mozilla-central/search?q=browser.js

I would expect mobile/android/chrome/content/browser.js to be listed in the "Files" section at the top but it's not.
The search code is at https://github.com/mozsearch/mozsearch/blob/2467d7042cedf046a7bb8887aabfd64eab64ca4e/router/router.py#L224

It does a grep on repo-files and takes the first 1000 results. At some point later it splits out the "test" files into a separate category. So:

ubuntu@ip-172-31-4-97:~/index/mozilla-central$ LC_CTYPE=C grep -Ei browser.js repo-files | grep -v test
browser/base/content/browser.js
browser/base/content/tabbrowser.js
browser/components/extensions/child/ext-browser.js
browser/components/extensions/ext-browser.json
browser/components/extensions/parent/ext-browser.js
devtools/client/framework/devtools-browser.js
devtools/client/performance-new/browser.js
devtools/client/responsive.html/components/Browser.js
devtools/client/sourceeditor/tern/browser.js
devtools/server/actors/webbrowser.js
js/src/devtools/rootAnalysis/expect.browser.json
mobile/android/chrome/content/browser.js
toolkit/components/viewsource/ViewSourceBrowser.jsm

ubuntu@ip-172-31-4-97:~/index/mozilla-central$ LC_CTYPE=C grep -Ei browser.js repo-files | head -n 1000 | grep -v test
browser/base/content/browser.js
browser/base/content/tabbrowser.js
browser/components/extensions/child/ext-browser.js
browser/components/extensions/ext-browser.json
browser/components/extensions/parent/ext-browser.js
devtools/client/framework/devtools-browser.js
devtools/client/performance-new/browser.js
devtools/client/responsive.html/components/Browser.js
devtools/client/sourceeditor/tern/browser.js
devtools/server/actors/webbrowser.js
js/src/devtools/rootAnalysis/expect.browser.json


Looks like mobile/android/chrome/content/browser.js isn't in the first 1000 results but most of those results are test files so they get shifted to the other category. But that's not at all obvious from the results page :(

Looks like mobile/android/chrome/content/browser.js isn't in the first 1000 results but most of those results are test files so they get shifted to the other category. But that's not at all obvious from the results page :(

I updated the title so this bug better represents the issue.

fwiw, browser.js no longer exists in the mobile/ hierarchy so we won't be able to reproduce this issue the same way.

Summary: Searchfox doesn't find mobile/android/chrome/content/browser.js when searching for browser.js → Relevant pages are excluded from results in favor of less relevant results from tests when limited to 1000 results (mobile/**/browser.js)
Assignee: nobody → bugmail
Status: NEW → ASSIGNED

Fixes landed for this and stuck as part of https://github.com/mozsearch/mozsearch/pull/605. File limits are now only applied after categorization and have been quadrupled to 4k.

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.