Skip to content

structural search: hardcode threshold to 100 for matching files per repo

Created by: rvantonder

Structural search gets a list of files to search based on matching files from Zoekt. Given a large enough repo and a common pattern, this can be up to 10K file paths, and will result in:

Screen Shot 2020-01-04 at 12 33 51 AM

Realistically, based on some playing around, this filtered file set usually doesn't exceed 100, and when it does, that should be something that specifying 'count' should/could override. This because filtered files in some sense 'guarantees' a match (and therefore results), so there isn't a good reason to accept a huge file list by default--we should shortcircuit and return results quicker. I'm hardcoding a thumbsuck limit of 100 filtered files to pass onto structural search for now, and will build in overrides when count is specified if/as needed in a later PR.

Merge request reports

Loading