Kentico / xperience-algolia

Enables the creation of Algolia search indexes and the indexing of Xperience content tree pages using a code-first approach.
https://www.kentico.com
MIT License
1 stars 3 forks source link

Feature: Algolia ISearchIndex Customization #16

Closed seangwright closed 2 years ago

seangwright commented 2 years ago

Motivation

Fixes #15 by adding a new IAlgoliaIndexService and a default implementation of DefaultAlgoliaIndexService which reproduces the existing behavior.

Developers can use decoration to get access to the IAlgoliaIndexService, or use the ISearchClient directly to generate a new index.

The latter approach also allows developers to target a different index per-environment, which isn't currently possible because index names have to be const string values on the index model.

This PR also addresses the following issues:

Checklist

How to test

No tests were added since the new abstraction has the exact same behavior as the existing code.

dotnet test

seangwright commented 2 years ago

I have a long-term vision to expose Rules defined in the application through a dashboard in the CMS.

This would enable marketers and administrators to enable/disable Rules as needed.

Rule toggling could support different marketing/promotion scenarios.

kentico-ericd commented 2 years ago

PR being reviewed here https://github.com/Kentico/xperience-algolia/pull/17