The addons DXR indexes the latest (highest?) submitted version/file, even if it got rejected. The public version should be indexed because that is the version which gets shipped to the users. Example: https://dxr.mozilla.org/addons/search?q=c75298dbb1ff36657a&redirect=false finds a file which only shipped in version 1.3.2, but that got rejected (it might have been approved and later rejected, I can't access that info). The latest public version is 1.3.1 and doesn't contain the file (version 1.3.2 seems to have shipped in September 2016 according to timestamp of the file in a profile).
DXR only indexes the data we get from the DB dump CloudOps provides; NI on :jason to see if this is feasible on their end.
We would need to adjust the 'latest_addon_extractor.py' script query used to find add-on filenames to something like: SELECT addon_id, filename FROM addons, versions, files WHERE versions.id = addons.current_version AND files.version_id = versions.id AND addontype_id = 1 r? from :mat if this query looks okay for comment 0.
Flags: needinfo?(jthomas) → needinfo?(mpillard)
It looks ok as long as you don't want to fetch unlisted add-ons/versions (current_version will never point to an unlisted version). You may also want to add a filter on addons.status != 11 (11 is deleted) and also filter out addons.inactive = 1 (inactive is set when a developer disables the addon listing on AMO).
Status: NEW → RESOLVED
Last Resolved: 9 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.