What are the available methods for local development when using Azure Search in a PAAS setup?

Massimo Della Calce asked on October 14, 2020 19:16

Using Azure Search as a Kentico search provider has various pros and cons.

Lucene can be run locally and appropriately tested prior to distribution. As Azure Search is cloud-based, developers can't have a disconnected sandbox to test index updates.

From what I know, there is no common API layer on the Kentico side to work on both search engines: if you make an implementation choice, it becomes difficult to go back ... correct? At this point the question is: in order to deploy the solution in the cloud, what are the best recommended practices?

Recent Answers


Sean Wright answered on October 15, 2020 06:06

Hi Massimo,

When we've integrated with Azure Search we've had 'dev' search indexes setup that all developers can connect their local instances to. You can create multiple indexes in a Search service as long as the indexes have different names.

If you take this approach, make sure you don't Stage/Sync changes to the Search index definition in Kentico to the next environment, as that would cause issues.

Yes, this doesn't allow for a completely offline development experience, but that's the nature of abstracted cloud services. Some of Azure's services allow for local emulators / runtimes (CosmosDb, Functions, Storage Accounts) but that's not the case with all services.

There is a definite cost that comes along with using Azure Search, both for a development index and the production service. Is that cost worth the improved feature set and offloading the Search indexing to an external service? That's up to you.

As to whether it is difficult to switch back and forth between Kentico's built-in Smart Search and Azure Search - yes this isn't going to be simple. You will need to abstract away the Azure Search SDK (which is used to query the search index) and Kentico's Search APIs and make a common abstraction that your code works against. In addition to this abstraction you are going to have to figure out what to do with any features available in Azure Search that aren't available in Kentico's Smart Search (like faceted searching).

1 votesVote for this answer Mark as a Correct answer

Massimo Della Calce answered on October 15, 2020 10:46

Thanks Sean. Another question arises: in a scenario where the application is deployed as a Web App Service in PaaS, is it possible to use both search engines?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.