Skip to content

Azure-Samples/azure-search-dotnet-scale

Repository files navigation

C# samples for Azure AI Search at scale

This repository contains C# code samples that demonstrate scale-up strategies for Azure AI Search.

If you want a code sample that deploys AI Search into multiple regions for global availability, try this Bicep sample instead: azure-search-multiple-regions.

In this repository

Sample Description
multiple-data-sources This .NET Core console app uses Azure AI Search indexers and the .NET SDK to import data from Azure Cosmos DB and Azure Blob storage, combing data from two sources into one search index.
multiple-search-services This Azure AI Search sample shows you how to issue a single query across multiple search services and combine the results into a single page. This sample uses Good Books data.
optimize-data-indexing This .NET Core console app builds off of the code used in the Quickstart and uses the Azure AI Search .NET SDK to create an index, and efficiently load it with documents. The app allows users to test various batch sizes to understand the optimal batch size and then demonstrates how to efficiently upload 100,000 documents to a search index. This is done by splitting the data into batches, and spinning up several threads to upload the documents. Any failures are monitored and then retried using the exponential backoff retry strategy. The index is modeled on a subset of the Hotels dataset, reduced for readability and comprehension. Index definition and documents are included in the code.

More resources