Skip to content
Snippets Groups Projects
Closed Allow searches on sourcegraph.com without `repo` keyword
  • View options
  • Allow searches on sourcegraph.com without `repo` keyword

  • View options
  • Closed Issue created by Warren Gifford

    Created by: ijt

    Currently sourcegraph.com doesn't show anything useful if you do a simple search without specifying a repo. For example, say we want to see an example of how to use "d3.selectAll". Currently sourcegraph.com gives this result:

    Screen Shot 2019-07-23 at 14 19 02

    It would be more useful if this search would show some examples of using this function in some popular repositories.

    Here are some steps to get there:

    • Figure out how much memory we'll probably need for zoekt-webserver by summing the sizes of all the repos, probably using http://github.com/ijt/reposize
    • Run zoekt-webserver and zoekt-sourcegraph-indexserver on sourcegraph.com
    • When zoekt-sourcegraph-indexserver asks for the repositories to index, give it say 20k repositories at random
    • Rank the repositories somehow (github stars, clone count, number of commits in other repos sharing a SHA with a commit in this repo) and index the top 20k based on that
    • When a query comes in without a repo field, search over some plausible repos instead of serving up a suggestion box.
    ✓ 5 of 5 checklist items completed

    Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first