Share via

C# semantic ranking with Azure AI Search

Flask sample MIT license badge

This code sample provides the syntax for semantic search. It demonstrates an approach for adding a semantic configuration to a search index and query parameters to a query.

Semantic search is in public preview. Use the latest beta version of the client libraries to access this feature.

Prerequisites

Set up the sample

  1. Clone or download this sample repository.
  2. Extract contents if the download is a zip file. Make sure the files are read-write.
  3. Get the service name and admin API key of your service. You can find this information in the Azure portal.

Run the sample

  1. Open the SemeanticSearchQuicksart.sln project in Visual Studio
  2. Open Program.cs.
  3. Replace the placeholder values for service name and admin API key with valid values for your search service.
  4. Compile and run the project.

Next steps

You can learn more about Azure AI Search on the official documentation site.