Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
116 changes: 95 additions & 21 deletions sdk/search/Azure.Search.Documents/CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sdk/search/Azure.Search.Documents/MigrationGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This guide is intended to assist in the migration to version 11 of the Azure Cog
To learn more about the Azure Cognitive Search client library for .NET, please refer to the [`Azure.Search.Documents` README](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/search/README.md) and [`Azure.Search.Documents` samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/search/Azure.Search.Documents/samples) for the `Azure.Search.Documents` library.

## Migration Guide
Details about the migration can be found in the [upgrade document](https://docs.microsoft.com/azure/search/search-dotnet-sdk-migration-version-11). It describes the API differences, code changes involved in the upgrade and the breaking changes.
Details about the migration can be found in the [upgrade document](https://learn.microsoft.com/azure/search/search-dotnet-sdk-migration-version-11). It describes the API differences, code changes involved in the upgrade and the breaking changes.

## Migration benefits

Expand Down
64 changes: 31 additions & 33 deletions sdk/search/Azure.Search.Documents/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Azure AI Search client library for .NET

[Azure AI Search](https://docs.microsoft.com/azure/search/) (formerly known as "Azure Cognitive Search") is an AI-powered information retrieval platform that helps developers build rich search experiences and generative AI apps that combine large language models with enterprise data.
[Azure AI Search](https://learn.microsoft.com/azure/search/) (formerly known as "Azure Cognitive Search") is an AI-powered information retrieval platform that helps developers build rich search experiences and generative AI apps that combine large language models with enterprise data.

The Azure AI Search service is well suited for the following application scenarios:

Expand All @@ -20,7 +20,7 @@ The Azure AI Search service is well suited for the following application scenari
Use the Azure.Search.Documents client library to:

* Submit queries using vector, keyword, and hybrid query forms.
* Implement filtered queries for metadata, geospatial search, faceted navigation,
* Implement filtered queries for metadata, geospatial search, faceted navigation,
or to narrow results based on filter criteria.
* Create and manage search indexes.
* Upload and update documents in the search index.
Expand Down Expand Up @@ -54,7 +54,7 @@ Here's an example using the Azure CLI to create a free instance for getting star
az search service create --name <mysearch> --resource-group <mysearch-rg> --sku free --location westus
```

See [choosing a pricing tier](https://docs.microsoft.com/azure/search/search-sku-tier)
See [choosing a pricing tier](https://learn.microsoft.com/azure/search/search-sku-tier)
for more information about available options.

### Authenticate the client
Expand All @@ -65,7 +65,7 @@ To interact with the search service, you'll need to create an instance of the ap

An API key can be an easier approach to start with because it doesn't require pre-existing role assignments.

You can get the **endpoint** and an **API key** from the search service in the [Azure portal](https://portal.azure.com/). Please refer the [documentation](https://docs.microsoft.com/azure/search/search-security-api-keys) for instructions on how to get an API key.
You can get the **endpoint** and an **API key** from the search service in the [Azure portal](https://portal.azure.com/). Please refer the [documentation](https://learn.microsoft.com/azure/search/search-security-api-keys) for instructions on how to get an API key.

Alternatively, you can use the following [Azure CLI](https://learn.microsoft.com/cli/azure/) command to retrieve the API key from the search service:

Expand Down Expand Up @@ -151,7 +151,7 @@ To use the preceding code, add this to your configuration:
}
}
```
You'll also need to provide your resource key to authenticate the client, but you shouldn't be putting that information in the configuration. Instead, when in development, use [User-Secrets](https://docs.microsoft.com/aspnet/core/security/app-secrets?view=aspnetcore-5.0&tabs=windows#how-the-secret-manager-tool-works). Add the following to `secrets.json`:
You'll also need to provide your resource key to authenticate the client, but you shouldn't be putting that information in the configuration. Instead, when in development, use [User-Secrets](https://learn.microsoft.com/aspnet/core/security/app-secrets?view=aspnetcore-5.0&tabs=windows#how-the-secret-manager-tool-works). Add the following to `secrets.json`:

```json
{
Expand All @@ -160,14 +160,14 @@ You'll also need to provide your resource key to authenticate the client, but yo
}
}
```
When running in production, it's preferable to use [environment variables](https://docs.microsoft.com/aspnet/core/security/app-secrets?view=aspnetcore-5.0&tabs=windows#environment-variables):
When running in production, it's preferable to use [environment variables](https://learn.microsoft.com/aspnet/core/security/app-secrets?view=aspnetcore-5.0&tabs=windows#environment-variables):

```
SEARCH__CREDENTIAL__KEY="..."
```
Or use other secure ways of storing secrets like [Azure Key Vault](https://docs.microsoft.com/aspnet/core/security/key-vault-configuration?view=aspnetcore-5.0).
Or use other secure ways of storing secrets like [Azure Key Vault](https://learn.microsoft.com/aspnet/core/security/key-vault-configuration?view=aspnetcore-5.0).

For more details about Dependency Injection in ASP.NET Core apps, see [Dependency injection with the Azure SDK for .NET](https://docs.microsoft.com/dotnet/azure/sdk/dependency-injection).
For more details about Dependency Injection in ASP.NET Core apps, see [Dependency injection with the Azure SDK for .NET](https://learn.microsoft.com/dotnet/azure/sdk/dependency-injection).

## Key concepts

Expand All @@ -178,26 +178,26 @@ indexes and database tables.)_ The Azure.Search.Documents client library
exposes operations on these resources through three main client types.

* `SearchClient` helps with:
* [Searching](https://docs.microsoft.com/azure/search/search-lucene-query-architecture)
* [Searching](https://learn.microsoft.com/azure/search/search-lucene-query-architecture)
your indexed documents using [vector queries](https://learn.microsoft.com/azure/search/vector-search-how-to-query),
[keyword queries](https://learn.microsoft.com/azure/search/search-query-create)
and [hybrid queries](https://learn.microsoft.com/azure/search/hybrid-search-how-to-query)
* [Vector query filters](https://learn.microsoft.com/azure/search/vector-search-filters) and [Text query filters](https://learn.microsoft.com/azure/search/search-filters)
* [Semantic ranking](https://learn.microsoft.com/azure/search/semantic-how-to-query-request) and [scoring profiles](https://learn.microsoft.com/azure/search/index-add-scoring-profiles) for boosting relevance
* [Autocompleting](https://docs.microsoft.com/rest/api/searchservice/autocomplete)
* [Autocompleting](https://learn.microsoft.com/rest/api/searchservice/autocomplete)
partially typed search terms based on documents in the index
* [Suggesting](https://docs.microsoft.com/rest/api/searchservice/suggestions)
* [Suggesting](https://learn.microsoft.com/rest/api/searchservice/suggestions)
the most likely matching text in documents as a user types
* [Adding, Updating or Deleting Documents](https://docs.microsoft.com/rest/api/searchservice/addupdate-or-delete-documents)
* [Adding, Updating or Deleting Documents](https://learn.microsoft.com/rest/api/searchservice/addupdate-or-delete-documents)
documents from an index

* `SearchIndexClient` allows you to:
* [Create, delete, update, or configure a search index](https://docs.microsoft.com/rest/api/searchservice/index-operations)
* [Declare custom synonym maps to expand or rewrite queries](https://docs.microsoft.com/rest/api/searchservice/synonym-map-operations)
* [Create, delete, update, or configure a search index](https://learn.microsoft.com/rest/api/searchservice/index-operations)
* [Declare custom synonym maps to expand or rewrite queries](https://learn.microsoft.com/rest/api/searchservice/synonym-map-operations)

* `SearchIndexerClient` allows you to:
* [Create indexers to automatically crawl data sources](https://docs.microsoft.com/rest/api/searchservice/indexer-operations)
* [Define AI powered Skillsets to transform and enrich your data](https://docs.microsoft.com/rest/api/searchservice/skillset-operations)
* [Create indexers to automatically crawl data sources](https://learn.microsoft.com/rest/api/searchservice/indexer-operations)
* [Define AI powered Skillsets to transform and enrich your data](https://learn.microsoft.com/rest/api/searchservice/skillset-operations)

Azure AI Search provides two powerful features:

Expand All @@ -207,9 +207,9 @@ Semantic ranking enhances the quality of search results for text-based queries.
- It applies secondary ranking to the initial result set, promoting the most semantically relevant results to the top.
- It extracts and returns captions and answers in the response, which can be displayed on a search page to enhance the user's search experience.

To learn more about Semantic Search, you can refer to the [sample](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/search/Azure.Search.Documents/samples/Sample08_SemanticSearch.md).
To learn more about semantic ranking, you can refer to the [sample](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/search/Azure.Search.Documents/samples/Sample08_SemanticSearch.md).

Additionally, for more comprehensive information about Semantic Search, including its concepts and usage, you can refer to the [documentation](https://learn.microsoft.com/azure/search/semantic-search-overview). The documentation provides in-depth explanations and guidance on leveraging the power of Semantic Search in Azure Cognitive Search.
Additionally, for more comprehensive information about semantic ranking, including its concepts and usage, you can refer to the [documentation](https://learn.microsoft.com/azure/search/semantic-search-overview). The documentation provides in-depth explanations and guidance on leveraging the power of semantic ranking in Azure AI Search.

#### Vector search

Expand Down Expand Up @@ -241,7 +241,7 @@ We guarantee that all client instance methods are thread-safe and independent of
## Examples

The following examples all use a simple [Hotel data set](https://github.com/Azure-Samples/azure-search-sample-data)
that you can [import into your own index from the Azure portal.](https://docs.microsoft.com/azure/search/search-get-started-portal#step-1---start-the-import-data-wizard-and-create-a-data-source)
that you can [import into your own index from the Azure portal.](https://learn.microsoft.com/azure/search/search-get-started-portal#step-1---start-the-import-data-wizard-and-create-a-data-source)
These are just a few of the basics - please [check out our Samples][samples] for
much more.

Expand Down Expand Up @@ -286,7 +286,7 @@ Let's explore them with a search for a "luxury" hotel.

#### Use C# types for search results

We can decorate our own C# types with [attributes from `System.Text.Json`](https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to):
We can decorate our own C# types with [attributes from `System.Text.Json`](https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to):

```C# Snippet:Azure_Search_Tests_Samples_Readme_StaticType
public class Hotel
Expand Down Expand Up @@ -444,7 +444,7 @@ client.CreateIndex(index);

You can `Upload`, `Merge`, `MergeOrUpload`, and `Delete` multiple documents from
an index in a single batched request. There are
[a few special rules for merging](https://docs.microsoft.com/rest/api/searchservice/addupdate-or-delete-documents#document-actions)
[a few special rules for merging](https://learn.microsoft.com/rest/api/searchservice/addupdate-or-delete-documents#document-actions)
to be aware of.

```C# Snippet:Azure_Search_Tests_Samples_Readme_Index
Expand Down Expand Up @@ -489,7 +489,7 @@ await foreach (SearchResult<Hotel> result in searchResponse.GetResultsAsync())

### Authenticate in a National Cloud

To authenticate in a [National Cloud](https://docs.microsoft.com/azure/active-directory/develop/authentication-national-cloud), you will need to make the following additions to your client configuration:
To authenticate in a [National Cloud](https://learn.microsoft.com/azure/active-directory/develop/authentication-national-cloud), you will need to make the following additions to your client configuration:

- Set the `AuthorityHost` in the credential options or via the `AZURE_AUTHORITY_HOST` environment variable
- Set the `Audience` in `SearchClientOptions`
Expand Down Expand Up @@ -537,7 +537,7 @@ See our [troubleshooting guide](https://github.com/Azure/azure-sdk-for-net/blob/
## Next steps

* Go further with Azure.Search.Documents and our [samples][samples]
* Read more about the [Azure AI Search service](https://docs.microsoft.com/azure/search/search-what-is-azure-search)
* Read more about the [Azure AI Search service](https://learn.microsoft.com/azure/search/search-what-is-azure-search)

## Contributing

Expand All @@ -554,22 +554,20 @@ For more information see the [Code of Conduct FAQ][coc_faq]
or contact [[email protected]][coc_contact] with any
additional questions or comments.

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net%2Fsdk%2Fsearch%2FAzure.Search.Documents%2FREADME.png)

<!-- LINKS -->
[source]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/search/Azure.Search.Documents/src
[package]: https://www.nuget.org/packages/Azure.Search.Documents/
[docs]: https://docs.microsoft.com/dotnet/api/Azure.Search.Documents
[rest_docs]: https://docs.microsoft.com/rest/api/searchservice/
[product_docs]: https://docs.microsoft.com/azure/search/
[docs]: https://learn.microsoft.com/dotnet/api/Azure.Search.Documents
[rest_docs]: https://learn.microsoft.com/rest/api/searchservice/
[product_docs]: https://learn.microsoft.com/azure/search/
[nuget]: https://www.nuget.org/
[create_search_service_docs]: https://docs.microsoft.com/azure/search/search-create-service-portal
[create_search_service_ps]: https://docs.microsoft.com/azure/search/search-manage-powershell#create-or-delete-a-service
[create_search_service_cli]: https://docs.microsoft.com/cli/azure/search/service?view=azure-cli-latest#az-search-service-create
[azure_cli]: https://docs.microsoft.com/cli/azure
[create_search_service_docs]: https://learn.microsoft.com/azure/search/search-create-service-portal
[create_search_service_ps]: https://learn.microsoft.com/azure/search/search-manage-powershell#create-or-delete-a-service
[create_search_service_cli]: https://learn.microsoft.com/cli/azure/search/service?view=azure-cli-latest#az-search-service-create
[azure_cli]: https://learn.microsoft.com/cli/azure
[azure_sub]: https://azure.microsoft.com/free/dotnet/
[RequestFailedException]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/core/Azure.Core/src/RequestFailedException.cs
[status_codes]: https://docs.microsoft.com/rest/api/searchservice/http-status-codes
[status_codes]: https://learn.microsoft.com/rest/api/searchservice/http-status-codes
[samples]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/search/Azure.Search.Documents/samples/
[search_contrib]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/search/CONTRIBUTING.md
[cla]: https://cla.microsoft.com
Expand Down
Loading
Loading