You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 30, 2022. It is now read-only.
Clear out some non-fn references to Algolia (github#20592)
* Clear out some non-fn references to Algolia
* Update .github/workflows/dry-run-sync-search-indices.yml
Co-authored-by: James M. Greene <[email protected]>
* Update contributing/search.md
Co-authored-by: James M. Greene <[email protected]>
Co-authored-by: James M. Greene <[email protected]>
Copy file name to clipboardExpand all lines: .github/actions-scripts/enterprise-server-issue-templates/release-issue.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@
34
34
- PLACEHOLDER
35
35
```
36
36
**Note:** All of the content in this file will be updated when the release notes are created in the megabranch including the filename `PLACEHOLDER.yml`. You can update the date or leave it as-is and wait to update it when the release notes are finalized.
37
-
- [ ] Create the Algolia search indices for the new release:
37
+
- [ ] Create the search indices for the new release:
38
38
```
39
39
npm run sync-search-ghes-release
40
40
```
@@ -51,7 +51,7 @@
51
51
```
52
52
sync-english-index-for-<PLAN@RELEASE>
53
53
```
54
-
☝️ This will run a workflow **on every push to the PR** that will sync **only** the English index for the new version to Algolia. This will make the GHES content searchable on staging throughout content creation, and will ensure the search updates go live at the same time the content is published. See [`contributing/search.md`](https://github.com/github/docs-internal/blob/main/contributing/search.md) for details.
54
+
☝️ This will run a workflow **on every push to the PR** that will sync **only** the English index for the new version. This will make the GHES content searchable on staging throughout content creation, and will ensure the search updates go live at the same time the content is published. See [`contributing/search.md`](https://github.com/github/docs-internal/blob/main/contributing/search.md) for details.
55
55
56
56
- [ ] In `github/github`, to create a new GHES release follow these steps:
57
57
- [ ] Copy the previous release's root document to a new root document for this release `cp app/api/description/ghes-<LATEST RELEASE NUMBER>.yaml app/api/description/ghes-<NEXT RELEASE NUMBER>.yaml`.
@@ -79,7 +79,7 @@ If the `OpenAPI dev mode check / check-schema-versions` check fails with the fol
79
79
#### `Node.js tests / test content` failures
80
80
81
81
If the `Node.js tests / test content` check fails with the following message, the `lib/enterprise-dates.json` file is not up-to-date:
82
-
> FAIL tests/content/algolia-search.js ● algolia › has remote indexNames in every language for every supported GHE version
82
+
> FAIL tests/content/search.js ● search › has remote indexNames in every language for every supported GHE version
83
83
84
84
This file should be automatically updated, but you can also run `script/update-enterprise-dates.js` to update it. **Note:** If the test is still failing after running this script, look at the dates for this release. If the date is still inaccurate, it may be an issue with the source at https://github.com/github/enterprise-releases/blob/master/docs/supported-versions.md#release-lifecycle-dates. If that is the case, manually update the dates in the `lib/enterprise-dates.json` file.
85
85
@@ -94,4 +94,4 @@ This file should be automatically updated, but you can also run `script/update-e
94
94
### 🚢 🛳️ 🚢 Shipping the release branch
95
95
96
96
- [ ] The `github/docs-internal` repo is frozen, and the `Repo Freeze Check / Prevent merging during deployment freezes (pull_request_target)` test is expected to fail. Use admin permissions to ship the release branch with this failure.
97
-
- [ ] Once smoke tests have passed, you can unfreeze the repos by deleting the `FREEZE` secret in both the `github/docs-internal` and `github/docs` repos. To delete the secrets, click the repo **Settings** tab and then click **Secrets** in the left sidebar. Click **Remove** next to the `FREEZE` secret.
97
+
- [ ] Once smoke tests have passed, you can unfreeze the repos by deleting the `FREEZE` secret in both the `github/docs-internal` and `github/docs` repos. To delete the secrets, click the repo **Settings** tab and then click **Secrets** in the left sidebar. Click **Remove** next to the `FREEZE` secret.
Copy file name to clipboardExpand all lines: contributing/search.md
+21-21
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Overview
4
4
5
-
This site's search functionality is powered by [Algolia](https://www.algolia.com), a third-party service.
5
+
This site's search functionality.
6
6
7
7
To see all existing search-related issues and pull requests, visit [github.com/github/docs/labels/search](https://github.com/github/docs/labels/search).
8
8
@@ -14,7 +14,7 @@ To see all existing search-related issues and pull requests, visit [github.com/g
14
14
15
15
## How to search
16
16
17
-
The site search is part of every version of docs.github.com. 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. On any page, you can use the search box to search the documents we've indexed.
17
+
The site search is part of every version of docs.github.com. This endpoint responds in JSON format, and fronts our search querying functionality. We recommend using this endpoint, as the endpoint will be more stable. On any page, you can use the search box to search the documents we've indexed.
18
18
You can also query our search endpoint directly at:
Using the attribute `topics` in your query will only return results that have the matching topic value. The `topics` attribute is configured as a [`filter only` facet in Algolia](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/). When the topic contains spaces, you must use quotes. For Algolia, [here](https://www.algolia.com/doc/api-reference/api-parameters/filters/#handle-attributes-with-spaces) is an example for filters containing spaces. Algolia also requires [boolean operators](https://www.algolia.com/doc/api-reference/api-parameters/filters) to combine more than one filter.
36
+
Using the attribute `topics` in your query will only return results that have the matching topic value. When the topic contains spaces, you must use quotes. Filters withspaces or combining filters requires special syntax.
37
37
38
38
## Production deploys
39
39
40
-
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.
40
+
A [GitHub Actions workflow](.github/workflows/sync-search-indices.yml) triggered by pushes to the `main` branch syncs the search data. This process generates structured data for all pages on the site, compares that data to what's currently on search, 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.
41
41
42
-
The Actions workflow progress can be viewed (by GitHub employees) in the [Actions tab](https://github.com/github/docs/actions?query=workflow%3AAlgolia) of the repo.
42
+
The Actions workflow progress can be viewed (by GitHub employees) in the [Actions tab](https://github.com/github/docs/actions?query=workflow%3Asearch) of the repo.
43
43
44
44
Because the workflow runs after a branch is merged to `main`, there is a slight delay for search data updates to appear on the site.
45
45
46
46
## Manual sync from a checkout
47
47
48
-
It is also possible to manually sync the indices to Algolia from your local checkout of the repo, before your branch is merged to `main`.
48
+
It is also possible to manually sync the indices from your local checkout of the repo, before your branch is merged to `main`.
49
49
50
-
**Prerequisite:** Make sure the environment variables `ALGOLIA_APPLICATION_ID` and `ALGOLIA_API_KEY` are set in your `.env` file. You can find these values on [Algolia](https://www.algolia.com/apps/ZI5KPY1HBE/api-keys/all).
50
+
**Prerequisite:** Make sure the environment variables `ALGOLIA_APPLICATION_ID` and `ALGOLIA_API_KEY` are set in your `.env` file. You can find these values on [Algolia](https://www.algolia.com/apps/ZI5KPY1HBE/api-keys/all)._Remove this paragraph when we switch to Lunr._
51
51
52
52
### Build without sync (dry run)
53
53
54
-
To build all the indices without uploading them to Algolia's servers (this takes about an hour):
54
+
To build all the indices without uploading them (this takes about an hour):
55
55
```
56
56
npm run sync-search-dry-run
57
57
```
@@ -65,11 +65,11 @@ Substitute a currently supported version for `<PLAN@RELEASE>` and a currently su
65
65
66
66
### Build and sync
67
67
68
-
To build all the indices and sync them to Algolia (this also takes about an hour):
68
+
To build all the indices and sync them (this also takes about an hour):
69
69
```
70
70
npm run sync-search
71
71
```
72
-
To build indices for a specific language and/or version and sync them to Algolia:
72
+
To build indices for a specific language and/or version and sync them:
73
73
```
74
74
VERSION=<PLAN@RELEASE LANGUAGE=<TWO-LETTER CODE> npm run sync-search
75
75
```
@@ -95,17 +95,17 @@ Why do we need this? For our daily shipping needs, it's tolerable that search up
95
95
96
96
### Actions workflow files
97
97
98
-
-[`.github/workflows/sync-algolia-search-indices.yml`](.github/workflows/sync-algolia-search-indices.yml) - Builds and syncs search indices whenever the `main` branch is pushed to (that is, on production deploys).
99
-
-[`.github/workflows/dry-run-sync-algolia-search-indices.yml`](.github/workflows/dry-run-sync-algolia-search-indices.yml) - This workflow can be run manually (via `workflow_dispatch`) to do a dry run build of all the indices. Useful for confirming that the indices can build without erroring out.
100
-
-[`.github/workflows/sync-single-english-algolia-index.yml`](.github/workflows/sync-single-english-algolia-index.yml) - This workflow is run when a label in the right format is applied to a PR. See "[Label-triggered Actions workflow](#label-triggered-actions-workflow)" for details.
98
+
-[`.github/workflows/sync-search-indices.yml`](.github/workflows/sync-search-indices.yml) - Builds and syncs search indices whenever the `main` branch is pushed to (that is, on production deploys).
99
+
-[`.github/workflows/dry-run-sync-search-indices.yml`](.github/workflows/dry-run-sync-search-indices.yml) - This workflow can be run manually (via `workflow_dispatch`) to do a dry run build of all the indices. Useful for confirming that the indices can build without erroring out.
100
+
-[`.github/workflows/sync-single-english-index.yml`](.github/workflows/sync-single-english-index.yml) - This workflow is run when a label in the right format is applied to a PR. See "[Label-triggered Actions workflow](#label-triggered-actions-workflow)" for details.
101
101
102
102
### Code files
103
103
104
104
-[components/lib/search.ts](components/lib/search.ts) - The browser-side code that enables search.
105
-
-[lib/search/algolia-client.js](lib/search/algolia-client.js) - A thin wrapper around the [algoliasearch](https://ghub.io/algoliasearch)Node.js module for interacting with the Algolia API.
106
-
-[lib/search/algolia-search-index.js](lib/search/algolia-search-index.js) - A class for generating structured search data from repository content and syncing it with the remote Algolia service. This class has built-in validation to ensure that all records are valid before they're uploaded. This class also takes care of removing deprecated records, and compares existing remote records with the latest local records to avoid uploading records that haven't changed.
107
-
-[script/sync-search-indices.js](script/sync-search-indices.js) - The script used by the Actions workflow to update search indices on our Algolia account. This can also be [run in the development environment](#development).
-[lib/search/client.js](lib/search/client.js) - A thin wrapper around the Node.js module for interacting with the search API.
106
+
-[lib/search/search-index.js](lib/search/search-index.js) - A class for generating structured search data from repository content and syncing it. This class has built-in validation to ensure that all records are valid before they're uploaded. This class also takes care of removing deprecated records, and compares existing remote records with the latest local records to avoid uploading records that haven't changed.
107
+
-[script/sync-search-indices.js](script/sync-search-indices.js) - The script used by the Actions workflow to update search indices. This can also be [run in the development environment](#development).
@@ -144,7 +144,7 @@ Each record represents a section of a page. Sections are derived by splitting up
144
144
145
145
## Notes
146
146
147
-
- It's not strictly necessary to set an `objectID` as Algolia will create one automatically, but by creating our own we have a guarantee that subsequent invocations of this upload script will overwrite existing records instead of creating numerous duplicate records with differing IDs.
148
-
-Algolia has typo tolerance. Try spelling something wrong and see what you get!
149
-
-Algolia has lots of controls for customizing each index, so we can add weights to certain attributes and create rules like "title is more important than body", etc. But it works pretty well as-is without any configuration.
150
-
-Algolia has support for "advanced query syntax" for exact matching of quoted expressions and exclusion of words preceded by a `-` sign. This is off by default but we have it enabled in our browser client. This and many other settings can be configured in Algolia.com web interface. The settings in the web interface can be overridden by the search endpoint. See [middleware/search.js]([middleware/search.js).
147
+
- It's not strictly necessary to set an `objectID` as the search index will create one automatically, but by creating our own we have a guarantee that subsequent invocations of this upload script will overwrite existing records instead of creating numerous duplicate records with differing IDs.
148
+
-Our search querying has typo tolerance. Try spelling something wrong and see what you get!
149
+
-Our search querying has lots of controls for customizing each index, so we can add weights to certain attributes and create rules like "title is more important than body", etc. But it works pretty well as-is without any configuration.
150
+
-Our search querying has support for "advanced query syntax" for exact matching of quoted expressions and exclusion of words preceded by a `-` sign. This is off by default but we have it enabled in our browser client. The settings in the web interface can be overridden by the search endpoint. See [middleware/search.js]([middleware/search.js).
0 commit comments