Closed seangwright closed 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.
PR being reviewed here https://github.com/Kentico/xperience-algolia/pull/17
Motivation
Fixes #15 by adding a new
IAlgoliaIndexService
and a default implementation ofDefaultAlgoliaIndexService
which reproduces the existing behavior.Developers can use decoration to get access to the
IAlgoliaIndexService
, or use theISearchClient
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:
Kentico.Xperience.AlgoliaSearch.csproj
to C# 7.3, because this is what is compatible withnetstandard2.0
which is what the library targetspublic
modifier from all interface methods because this is not supported with C# 7.3abstract
interface method modifier which is only useful when other methods provide default implementationsChecklist
How to test
No tests were added since the new abstraction has the exact same behavior as the existing code.
dotnet test