Skills Azure.Search.Documents (.NET)
📦

Azure.Search.Documents (.NET)

Safe

Build Azure AI Search Apps with .NET

Developers need to integrate powerful search capabilities into .NET applications but face complexity with the Azure Search SDK. This skill provides code examples and best practices for implementing full-text, vector, semantic, and hybrid search with the Azure.Search.Documents package.

Supports: Claude Codex Code(CC)
📊 70 Adequate
1

Download the skill ZIP

2

Upload in Claude

Go to Settings → Capabilities → Skills → Upload skill

3

Toggle on and start using

Test it

Using "Azure.Search.Documents (.NET)". How do I upload documents to an Azure Search index?

Expected outcome:

Use SearchClient.UploadDocumentsAsync() for new documents, MergeDocumentsAsync() for updates, or MergeOrUploadDocumentsAsync() for upsert operations. Create an IndexDocumentsBatch for multiple operations.

Using "Azure.Search.Documents (.NET)". What authentication options are available?

Expected outcome:

DefaultAzureCredential (recommended for production) uses managed identity, service principal, or VS credentials. AzureKeyCredential is available but not recommended for production due to key management concerns.

Security Audit

Safe
v1 • 2/25/2026

This is a documentation-only skill containing SKILL.md with code examples. No executable code is present. Static analysis found 0 files scanned, 0 potential security issues, and a risk score of 0/100. The skill provides informational content about Azure Search SDK usage without any network, filesystem, or command execution capabilities.

0
Files scanned
0
Lines analyzed
0
findings
1
Total audits
No security issues found
Audited by: claude

Quality Score

38
Architecture
100
Maintainability
87
Content
32
Community
100
Security
83
Spec Compliance

What You Can Build

Full-Text Search Implementation

Add keyword search to .NET applications with filtering, sorting, faceting, and pagination using SearchClient and SearchOptions.

Vector Search Integration

Implement semantic vector search in .NET apps using embeddings and the VectorizedQuery API for AI-powered relevance.

Hybrid Search Application

Combine full-text, vector, and semantic search for maximum relevance in .NET applications.

Try These Prompts

Basic Search Setup
Show me how to set up a SearchClient with DefaultAzureCredential and perform a basic search query with filters in a .NET application using Azure.Search.Documents.
Create Search Index
Generate code to create a search index with the FieldBuilder using model attributes for a Hotel class with key, filterable, sortable, and searchable fields in C#.
Vector Search Query
Write C# code to perform a vector search using VectorizedQuery with HNSW algorithm configuration and return results with their similarity scores.
Semantic Search with Answers
Show how to configure semantic search with QueryCaption and QueryAnswer to get extracted answers and highlighted captions from Azure AI Search.

Best Practices

  • Use DefaultAzureCredential over API keys for production environments to leverage managed identity
  • Use FieldBuilder with model attributes for type-safe index definitions and automatic schema generation
  • Batch document operations using IndexDocumentsBatch for better throughput and reduced API calls

Avoid

  • Using API keys in production code instead of DefaultAzureCredential with managed identity
  • Loading all fields with Select when only specific fields are needed
  • Not handling RequestFailedException for proper error handling and debugging

Frequently Asked Questions

What is the difference between SearchClient, SearchIndexClient, and SearchIndexerClient?
SearchClient is used for querying indexes and CRUD operations on documents. SearchIndexClient creates and manages indexes and synonym maps. SearchIndexerClient manages indexers, skillsets, and data sources.
How do I handle authentication in development vs production?
Use DefaultAzureCredential which automatically selects the best authentication method. In development, it uses Visual Studio credentials. In production on Azure, it uses Managed Identity.
Can I use this skill to create an Azure Search service?
No, this skill provides code examples for the SDK. You need to create the Azure AI Search service through Azure Portal, CLI, or ARM templates separately.
What is hybrid search?
Hybrid search combines keyword search, vector search, and semantic ranking to provide the most relevant results. It uses Reciprocal Rank Fusion to combine results from different search approaches.
How do I add vector search to my index?
Add a field with VectorSearchField attribute, configure VectorSearchProfile with HnswAlgorithmConfiguration, and use VectorizedQuery to search with embeddings.
What are the key differences between v11 and earlier versions?
Version 11 introduced improved async patterns, better error handling with RequestFailedException, and updated field builder syntax. Earlier versions used different client initialization patterns.

Developer Details

File structure

📄 SKILL.md