3

Do we have any general instructions to follow to implement any custom search provider in Sitecore other than officially supported Solr and Azure Search?

We need to implement for Algolia search provider.

Already looked at two repositories out there:

https://github.com/dharnitski/Sitecore.Algolia

https://github.com/chorpo/Sitecore.Algolia/tree/sitecore91

Upgraded code and configurations to support Sitecore latest version (10.1), but Custom Index doesn't show on the Indexing Manager. No error in logs. Any help would be highly appreciated.

What mainly drives a particular index to show on the Indexing Manager? We are using Solr for all the Sitecore default Indexes (they are showing up) and using Algolia for Custom Indexes.

2 Answers 2

1

Do we have any general instructions to follow to implement any custom search provider in Sitecore other than officially supported Solr and Azure Search?

To start with, due to difficulties with Azure Search capabilities, Sitecore has deprecated Azure Search and fully removed it in Sitecore 10.2.

So that leaves us with only 1 currently supported provider: Solr. Saying that Coveo is an option isn't exactly true as Coveo still requires Solr for the core CMS.

In my opinion it's not possible to support everything that is supported by the Solr provider. This is mainly due to the cohesion of the underlying internal classes. To note that it changed a lot in the 9.x series and continues to do so, therefore the maintenance alone is a large effort.

If your goal is to index content for front-end use only then of course you can plug into the search provider pipelines, but my point remains about it being difficult to maintain, and therefore seeing as you need Solr anyway, I'd say the extra cost is not worth it. Solr, when configured correctly in SolrCloud, is very fast, not that I've done any benchmarking compared to Algolia, but I've used it including bypassing the Sitecore Solr Proxy for advanced query faceting that the Sitecore Solr provider (and proxy) don't support, and I've found it very fast (~20ms response times for facet queries over huge datasets).

1

It is a difficult one to answer completely. Putting in answer instead of comment because of the length.

Based on this link https://doc.sitecore.com/en/developers/91/platform-administration-and-architecture/configure-a-search-and-indexing-provider.html

Sitecore supports 3 search providers at the moment. Good to first quick check with Sitecore support if a Custom Search provider is possible or not. Means are there any hard-coded references of these 3 options in core Sitecore dlls.

We have below,

For Solr = webroot\App_Config\Sitecore\ContentSearch

For Azure = webroot\App_Config\Sitecore\ContentSearch.Azure

Maybe for the custom search providers we may duplicate one of these folders and explore the configuration and provide custom classes wherever necessary.

>>What mainly drives a particular index to show on the Indexing Manager?

Upon checking the backend of the indexing manager dialog i.e. Sitecore.ContentSearch.Client.Forms.IndexingManagerWizard

webroot\sitecore\shell\Applications\ContentSearch\IndexingManager.xml

Indexes information is fetched from ContentSearchManager.Indexes

This leads to.

public static IEnumerable<ISearchIndex> Indexes => (IEnumerable<ISearchIndex>) ContentSearchManager.SearchConfiguration.Indexes.Values;

=>

Checked AddIndex method in Sitecore.ContentSearch.ContentSearchConfiguration which actually adds the indexes information based on Sitecore.ContentSearch.{SearchProvider}.Index.{Database}.config (e.g Sitecore.ContentSearch.Azure.Index.Master.config) or your copy of this file to implement the custom indexing used by your provider.

Basically we need to satisfy the required custom types used in above config specific to search provider needs. Like we need to have custom CloudSearchProviderIndex (implementing ISearchService) and CompositeSearchService (implementing ISearchIndex)

These interfaces are used in ContentSearchConfiguration. Good to explore Sitecore.ContentSearch.Azure.dll in dotpeek for all these existing types and have our custom types for custom search provider accordingly.

enter image description here

1
  • Note that all references to Azure Cognitive Search now include the following warning: "Azure Search will be discontinued in the future and Sitecore will no longer provide support for this service in future releases." Nov 2, 2021 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.