Provide alternative for Αlgolia search for air-gapped environments

From the discussion in &693 (comment 276094908), it became apparent that air-gapped installations are to be taken into consideration for the /help removal epic.

We currently use Algolia in production, and that needs an internet connection, since it connects with their servers to provide the search results.

We might need to come up with an alternative for the cases where the docs are to be used in an air-gapped environment where no internet access is allowed.

Approach

We set up a demo of Lunr.js and investigated indexing strategies in this demo MR. Lunr looks like a good choice for offline search.

Next steps:

  • Refine the demo script to create the Lunr index (!3022 (merged))
  • Add a variable for designating the search backend (Algolia or Lunr) for a site instance that is visible to Nanoc on compile (!3022 (merged))
  • Add logic to templates to render the chosen search backend, and add a frontend for Lunr that looks/behaves similarly to Algolia
  • Conditionally include Lunr in Docker images (issue: #1255 (closed))

Research

Offline search engines

Search engines, might not all fit in our case:

Articles:

Cons of an offline search

The index can be of significant size, for example https://github.com/olivernn/lunr.js/issues/268.

Edited by Sarah German