...
Either create your own class which implements Hawksearch.Kentico.Xperience.CMS.Services.Indexing.Contracts.IHawksearchIndexer or inherit from Hawksearch.Kentico.Xperience.CMS.Services.Indexing.Indexer.
Implement your custom logic.
Create a new module to contain the initialization code: https://docs.xperience.io/custom-development/creating-custom-modules/initializing-modules-to-run-custom-code
In the module’s OnPreInit method, register your new indexer class. Here CustomIndexer is assumed to be your indexer class, so replace it with your own class name:
Code Block protected override void OnPreInit() { base.OnPreInit(); CMS.Core.Service.Use<IHawksearchIndexer>(new CustomIndexer()Use<IHawksearchIndexer,CustomIndexer>(); }
5. Now the system will use your custom indexer.