Include versions in Algolia search
To include versions in Algolia search, we need to edit Algolia's config (crawler) to include search results for versions.
Our latest docs URL scheme is https://docs.gitlab.com/{version}/{selector_key}/path/to/file
:
-
{version}
translates tomajor.minor
numbers like 10.3, 10.4, etc. -
{selector_key}
is one ofee
,omnibus
,runner
.
selector_key
is not an issue, since Algolia indexes the whole website in one go.
Implementation
See https://docsearch.algolia.com/docs/record-extractor#indexing-content-for-faceting
We might be able to take a look of the old configs, before the DocSearch v3 migration and see how this works:
- Our config https://github.com/algolia/docsearch-configs/blob/master/configs/gitlab.json
- Example config https://github.com/algolia/docsearch-configs/blob/75a4d86bf367d841bc4e67b2f4265be5bdbb3b59/configs/cordova.json
- https://discourse.algolia.com/t/can-docsearch-handle-different-versions-of-the-documentation/802
Edited by Achilleas Pipinellis