Azure AI Search for .NET
Build .NET search applications with practical Azure AI Search patterns for full-text, vector, semantic, and hybrid retrieval.
The documentation offers Entra credentials and API-key authentication, recommends DefaultAzureCredential for production, and is covered by an MIT license with a security-reporting path in the repository. Points are deducted because least-privilege RBAC, confirmation requirements, secret management, rollback for deletes/index changes, and complete data-flow disclosure are not specified.
Installation, authentication, index management, CRUD, basic/vector/semantic/hybrid search, and error handling are covered with broadly consistent paths. Points are deducted because this is an unexecuted static review; version compatibility, null environment variables, service capabilities/quotas, and several API details lack diagnosable guidance, so the static ceiling of 10 applies.
Triggers, SDK target, client selection, and major search scenarios are clearly described. Points are deducted because non-fit cases, input/output contracts, service-tier/region constraints, Chinese-language behavior, and mainland-China network reachability are not established; boundaries for full deployment and index operations are underspecified.
The material is layered across installation, authentication, client selection, operation patterns, best practices, and reference files, and includes MIT licensing, author, and 1.0.0 metadata. Points are deducted for no explicit changelog, maintenance owner or update path, undated/unsourced current-version claims, and limited FAQ, troubleshooting, and dependency-compatibility guidance.
The examples directly address common Azure.Search.Documents .NET tasks and include reusable C# patterns plus basic error handling, supporting the core task statically. Points are deducted because there is no complete runnable project, embedding implementation, full index prerequisite setup, or service permission/cost guidance; adaptation remains necessary, and the static ceiling of 7 applies.
The skill contains concrete APIs, package versions, code samples, and linked reference files; repository-level CI/evaluation infrastructure also exists. Points are deducted because the supplied material contains no skill-specific committed tests or third-party execution evidence, repository-wide harnesses do not validate this path's key examples, and claim-level sourcing and fact/inference separation are thin; the static ceiling of 5 applies.
- Do not treat the snippets as verified runnable code; compile and test key paths against the pinned Azure.Search.Documents version.
- Use least-privilege RBAC and secure secret storage in production, with explicit confirmation, backup, and recovery before deletes or index changes.
- Separately verify the target Azure region, service tier, semantic/vector feature availability, Chinese retrieval quality, and mainland-China network reachability.
What it does & when to use it
This skill supports .NET developers building search applications with the Azure.Search.Documents SDK. It covers SearchClient, SearchIndexClient, and SearchIndexerClient, from index management and document operations to full-text, vector, semantic, and hybrid search. It also demonstrates Microsoft Entra credential and API-key authentication, field modeling, autocomplete, suggestions, facets, and error handling. It fits teams that already have an Azure AI Search service and need implementation guidance in C#; it does not document Azure resource provisioning or full application deployment.
Provides installation commands for Azure.Search.Documents and Azure.Identity and identifies the required endpoint, index, and authentication variables; shows how to create SearchClient, SearchIndexClient, and SearchIndexerClient instances; defines and updates index fields, vector profiles, and semantic settings; uploads, merges, deletes, and batches documents; builds queries with filters, ordering, pagination, field selection, and facets; implements autocomplete, suggestions, pure vector search, semantic search, and keyword-plus-vector hybrid search; and handles RequestFailedException, including a dedicated 404 path for missing indexes.
- A C# developer building a hotel, product, or content catalog that needs full-text search, filtering, sorting, and faceted navigation.
- A .NET team with text embeddings that needs nearest-neighbor vector retrieval in Azure AI Search.
- An application team combining keyword search, vector retrieval, and semantic ranking for natural-language queries.
- An Azure developer managing index fields, synonym maps, or vector configuration through SearchIndexClient.
- A .NET engineer managing data sources, indexers, and skillsets through SearchIndexerClient.
Pros & cons
- Covers the main SDK workflow from index creation through querying and document maintenance.
- Includes full-text, vector, semantic, and hybrid search examples.
- Shows both DefaultAzureCredential and AzureKeyCredential authentication.
- Includes FieldBuilder, batch operations, facets, autocomplete, suggestions, and common error handling.
- Focused specifically on Azure.Search.Documents for .NET and C#.
- Does not provide Azure AI Search resource provisioning, network configuration, or application deployment guidance.
- The detailed vector-search and semantic-search reference files are mentioned but not included in the supplied material.
- The supplied material does not define compatibility across specific coding-agent versions or runtime environments.
How to install
For a project, run:
dotnet add package Azure.Search.Documents
dotnet add package Azure.Identity
To install the broader Agent Skills collection, run:
npx skills add microsoft/skills
Then select the skills needed for your agent. This skill is located at .github/plugins/azure-sdk-dotnet/skills/azure-search-documents-dotnet/SKILL.md.
How to use
Place the skill directory in the skills directory used by an Agent Skills-compatible coding agent, then use a prompt such as: "Use Azure.Search.Documents to implement hybrid search for my C# hotel catalog, including index definition, batched document upload, and semantic configuration." Provide SEARCH_ENDPOINT and SEARCH_INDEX_NAME. When using DefaultAzureCredential, configure AZURE_TOKEN_CREDENTIALS as described; for API-key authentication, configure SEARCH_API_KEY. Azure resource creation and deployment steps are not documented in the supplied skill.