From 0577d4fc4e2f78614bbfd06b50ff1beda606aa73 Mon Sep 17 00:00:00 2001 From: Kevin Heis Date: Tue, 26 Jan 2021 11:25:34 -0800 Subject: [PATCH] Update search.md (#17502) --- contributing/search.md | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/contributing/search.md b/contributing/search.md index 589c377419..093a419341 100644 --- a/contributing/search.md +++ b/contributing/search.md @@ -1,17 +1,5 @@ # Search -## Table of contents -- [Overview](#overview) -- [Production deploys](#production-deploys) -- [Manual sync from a checkout](#manual-sync-from-a-checkout) - - [Build without sync (dry run)](#build-without-sync-dry-run) - - [Build and sync](#build-and-sync) -- [Label-triggered Actions workflow](#label-triggered-actions-workflow) -- [Files](#files) - - [GitHub Actions workflow files](#github-actions-workflow-files) - - [Code files](#code-files) - - ## Overview This site's search functionality is powered by [Algolia](https://www.algolia.com), a third-party service. @@ -24,6 +12,12 @@ To see all existing search-related issues and pull requests, visit [github.com/g --- +## How to search + +The site search is part of every version of docs.github.com. On any page, you can use the search box to search the documents we've indexed. +You can also query our search endpoint directly at: https://docs.github.com/search?language=en&version=dotcom&query=jekyll +This endpoint responds in JSON format, and fronts Algolia and Lunr. We recommend using this endpoint over directly integrating with Algolia or Lunr, as the endpoint will be more stable. + ## Production deploys A [GitHub Actions workflow](.github/workflows/sync-algolia-search-indices.yml) triggered by pushes to the `main` branch syncs the search data to Algolia. This process generates structured data for all pages on the site, compares that data to what's currently on Algolia, then adds, updates, or removes indices based on the diff of the local and remote data, being careful not to create duplicate records and avoiding any unnecessary (and costly) indexing operations.