Skip to content

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

  1. Checkout this branch (lunr-node-index) and run the new make command: make build-lunr-index
  2. 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:

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.

Edited by Sarah German

Merge request reports

Loading