How GitHub Docs’ new search works
Mar 9, 2023Peter Bengtsson10 min read
Opens github.blogWhat the post covers
This post details the migration of GitHub Docs site search from an in-memory solution to Elasticsearch.
- It explains the local Elasticsearch setup for developers, the core search implementation strategy of a single, complex query to Elasticsearch, and the detailed ranking logic.
- The ranking logic involves a matrix of matching techniques (match_phrase, match with AND/OR) applied to different fields (title, headings, content) with distinct analyzers ('explicit' vs.
- 'regular' with stemming/synonyms).
- Each combination has a calculated boost, and the post illustrates the boost values and their impact on result ranking.
- It also mentions the use of pageview metrics for further ranking refinement.




