Add Lunr.js index script
What does this MR do and why?
- Adds a script for prebuilding a lunr.js search index
- Adds a make command to run the script
- Adds a job to the pipeline for conditionally building the index (we only want this for non-Algolia environments)
Screenshots, screen recordings, or links to review app
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
- Checkout this branch (
lunr-node-index) and run the new make command:make build-lunr-index - Verify this script creates two files:
- public/assets/javascripts/lunr-index.json (~2.7M mb)
- public/assets/javascripts/lunr-map.json (~157 kb)
These files aren't used by anything yet; the frontend for Lunr search will be in a separate MR.
You can see these files in the review app as well:
- http://lunr-node-index.35.193.151.162.nip.io/assets/javascripts/lunr-index.json
- http://lunr-node-index.35.193.151.162.nip.io/assets/javascripts/lunr-map.json
Merge request acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this merge request.
Edited by Sarah German