Exercise 1: Why GitHub Code Search Reaches What General Web Search Can't — Possible Solution ==================================================================== WHAT GENERAL WEB SEARCH ACTUALLY INDEXES ON GITHUB ------------------------------ Per this chapter, general web search indexes GitHub "inconsistently, and rarely down to the level of a specific line buried inside a specific file in a specific repository." It tends to reach READMEs and repo descriptions far more reliably than deep file contents, partly because GitHub is a large, heavily JavaScript-rendered site and a general crawler isn't specifically built to exhaustively index every individual source file inside every repository. WHAT GITHUB'S OWN CODE SEARCH DOES DIFFERENTLY ------------------------------ Per this chapter, GitHub's own code search "operates directly against the real file contents of public repositories" - it isn't crawling and ranking GitHub pages the way a general search engine does, it's querying an index built specifically from the literal contents of source files themselves, with dedicated qualifiers (language:, path:, extension:, repo:, org:) built for exactly this purpose. WHY THIS MEANS THE SAME REPOSITORIES YIELD DIFFERENT RESULTS ------------------------------ Even searching the identical set of public repositories, the two tools are built on fundamentally different indexing depth and purpose. General web search treats a repository largely as one page (or a handful of pages) to rank by overall relevance; GitHub code search treats every individual file's actual content as directly, precisely searchable. A specific line of code buried deep in a large file might never surface through a general web search no matter how the query is phrased, while GitHub's own code search can locate it directly because it was built specifically to search at that level of granularity. WHY THIS WORKS AS AN ANSWER ------------------------------ It identifies the specific limitation of general web search's GitHub coverage (page-level indexing, not file-content-level), explains what GitHub's own tool does structurally differently, and connects the two to explain why identical source material still produces very different search outcomes depending on which tool is used.