aspire icon indicating copy to clipboard operation
aspire copied to clipboard

added the SearchIndexerClient as extension method

Open The3G opened this issue 2 months ago • 3 comments

This pull request introduces support for the Azure Search Indexer client to the Aspire Azure Search integration. It adds new extension methods for registering and configuring SearchIndexerClient instances, including dependency injection and health checks, and updates the playground sample to demonstrate usage. Several code quality improvements and suppressions for code analysis warnings are also included.

Azure Search Indexer Client Integration:

  • Added AspireAzureSearchIndexerExtensions with AddAzureSearchIndexerClient and AddKeyedAzureSearchIndexerClient extension methods for registering SearchIndexerClient in DI, including configuration and health check support.
  • Introduced AzureSearchIndexerHealthCheck to provide health monitoring for the SearchIndexerClient.

Playground Sample Enhancements:

  • Updated Program.cs to register and demonstrate use of SearchIndexerClient, including logging of indexers and index names.

Code Quality and Maintenance:

  • Added pragma suppressions for various code analysis warnings (e.g., unused parameters, placeholder casing, unused variables) to improve code clarity and maintainability in the playground sample. [1] [2] [3] [4] [5]
  • Improved null argument checking in AzureSearchIndexHealthCheck and added documentation comments.

Project and Packaging:

  • Added a new project file for Aspire.Azure.Search with appropriate metadata, references, and shared source files.

The3G avatar Oct 27 '25 20:10 The3G

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12413

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12413"

github-actions[bot] avatar Oct 27 '25 20:10 github-actions[bot]

@dotnet-policy-service agree

The3G avatar Oct 27 '25 20:10 The3G

Thanks for the contribution, @The3G. Can you add some tests for this change?

eerhardt avatar Nov 13 '25 15:11 eerhardt