Skip to content

Lombiq/Orchard-Algolia-Search

Repository files navigation

Hosting - Algolia Search Readme

This module integrates Algolia with the existing indexing and search features of Orchard CMS. If you don't have an account already then click here to register and start using Algolia search in Orchard. If you want to just check out how the module works from the frontend, see the Orchard Algolia Search Demo site on DotNest.

Hosting - Algolia Search is part of the Hosting Suite, which is a complete Orchard DevOps technology suite for building and maintaining scalable Orchard applications. The module is also available for DotNest sites.

The module deliberately doesn't provide any styling for the search feature apart from what's already there in the Algolia SDK. You need to style it and configure its capabilities adapted to the site that you're using it on; this can be easily done, see below.

The module's source is available in two public source repositories, automatically mirrored in both directions with Git-hg Mirror:

This project is developed by Lombiq Technologies Ltd, one of the core developers of Orchard itself. Commercial-grade support is available through Lombiq.

Configuration

  1. Fill out the API keys in Algolia Search Settings in the Orchard admin.
  2. Index some content in Orchard as usual.
  3. At this point the search from in the UI will work as expected (because it doesn't use the backend search services), but the admin search won't.
  4. Check out your newly created index in the Algolia Dashboard.
  5. If you want the admin search work properly, then configure Searchable Attributes (this is like when you set the fields in search settings in Orchard) and Attributes for faceting (this needs to be configured for the WithField() and WithinRange() methods to work).

Unsupported Orchard features

Search on the frontend

  • It uses InstantSearch.js.
  • Override Search.SearchForm.cshtml if you want a completely different UI.
  • Override Algolia.Searchit.Template.cshtml if you just want to display hits differently. Note that when you override this template you have to use the Mustache syntax.

Implementation notes

  • After rebuilding an index all your settings will be lost for that particular index so you need to configure it again in the Algolia dashboard.
  • The methods which aren't implemented are either not supported or can be configured from the Algolia dashboard.
  • The maximum number of hits is 1000 because it's recommended in order to keep good performance. With AlgoliaSearchBuilder.Count() it's the maximum number you can get so the UI won't display a higher number than what can properly be displayed.