How I let Cursor build an Azure Search provider for Umbraco Search

November 27, 2025. The Umbraco 17 launch party. I presented a session on building an Azure Search provider for Umbraco Search using Cursor.

The problem

Umbraco Search supports pluggable backends: Elasticsearch and Typesense already had community providers. I wanted to build one for Azure Search. That meant writing a custom indexer, searcher, index manager, dependency injection wiring, and configuration layer.

I started with nothing. No Azure Search environment. No boilerplate. My first prompt was: I want to use this to do some experiments with Azure Search. My second was: I don't have an Azure Search environment yet. Can you help with that?

Cursor helped set up the Azure Search environment through the Azure CLI and pasted the connection details into the playground's configuration. The result was a complete playground where I could call Azure Search via Swagger APIs.

The Azure Search Playground Cursor built

Make AI do the research phase first

Before asking Cursor to build anything, I fed it four codebases to analyse:

  • @Kjac.SearchProvider.Elasticsearch/ - to learn the architecture and patterns
  • @Kjac.SearchProvider.Typesense/ - to see a different approach to the same abstractions
  • @Playground/ - to learn the Azure Search SDK specifically
  • @UmbracoSearchDemo/ - to understand the target integration point

The prompt was the same each time: Analyse everything in this folder and its children.

After reading all four, Cursor produced a breakdown called "Your Strategic Approach". What it learned from the Elasticsearch provider. What it learned from Typesense. What the Playground told it about the Azure SDK. Where the provider code should live in the demo project.

The last lines were the ones I didn't expect:

"This is a textbook example of how to effectively use an AI coding assistant - give comprehensive context first, then state the goal. Much better than just saying 'build me an Azure Search provider' without context."

And then: "You basically had me do the research phase before the implementation phase. Smart."

Cursor's response after analysing all four codebases. The last line says it all.

Through this analysis, Cursor knew how existing providers were built, had a working Azure Search example to reference, and understood exactly where the new code should go.

Plan before you build

Next prompt:

I want to build my own search provider based on Kjac.SearchProvider.Elasticsearch and
Kjac.SearchProvider.Typesense for Azure Search. That's why I also have the Playground.
I don't want the search provider in a separate project. It can be a folder in
UmbracoSearchDemo with all the files so I can run that site and test it.
Give me a todo plan for this.

Cursor produced 30 tasks across 5 phases.

Phases 1-3: project structure, services layer, and integration. The first 20 tasks were writing the code.

Phases 4-5: testing and polish. The last 10 tasks were verifying it actually worked.

The plan is a checkpoint. The moment you can review what the AI intends to do before it does it. Once I said Let's start!, it moved fast.

What happened when it ran

Cursor didn't stop at writing the code. It ran dotnet build itself.

It hit a naming conflict. FacetResult exists in both the Azure SDK and Umbraco's namespace. Cursor diagnosed the problem, added type aliases, and rebuilt. No input from me.

Cursor hits a naming conflict, fixes it with type aliases, and rebuilds successfully.

Then it ran the site. It parsed the Umbraco log file. It found that Azure Search rejects dots in field names. Only letters, digits, and underscores are allowed. It fixed the FieldName helper method and moved on.

A runtime error in the logs. Azure Search field names cannot contain dots. Cursor reads the log, identifies the cause, and fixes it.

The result

The Azure Search provider running successfully - 15 source files, index created, content rebuilding.

The site was running. The index had been created in Azure Search. Content was rebuilding. I had to fix a few small things manually afterwards, but when I started the demo site I could immediately search and saw the index appear in Azure Search.

Then I committed.

One commit. 21 changed files. What would have taken two days took two hours.

What would have normally cost me at least two days of work was done in two hours. The code is on GitHub if you want to look at it: azure-search branch.

Conclusion

A lot has changed in AI since November 2025, but I still wanted to share what I showed at the launch party. With enough context and good reference material, it is possible to build complete search providers for Umbraco in a single session. One commit, two hours instead of two days.

Always check the generated code. Cursor fixed two bugs autonomously in this session without me asking. That is exactly why you need to understand what it built.