Skip to content

Commit 5f6035f

Browse files
authored
Merge pull request #2860 from eric-urban/eur/entra-full-text-qs-csharp
csharp quickstart run and then explain
2 parents 338d4db + 39d63e7 commit 5f6035f

File tree

8 files changed

+871
-341
lines changed

8 files changed

+871
-341
lines changed

articles/search/includes/quickstarts/full-text-csharp.md

Lines changed: 765 additions & 311 deletions
Large diffs are not rendered by default.

articles/search/includes/quickstarts/full-text-intro.md

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,10 @@ author: eric-urban
44
ms.author: eur
55
ms.service: azure-ai-search
66
ms.topic: include
7-
ms.date: 2/8/2025
7+
ms.date: 2/12/2025
88
---
99

10-
Learn how to use the *Azure.Search.Documents* client library in an Azure SDK to create, load, and query a search index using sample data for [full text search](../../search-lucene-query-architecture.md). Full text search uses Apache Lucene for indexing and queries, and a BM25 ranking algorithm for scoring results.
10+
Learn how to use the *Azure.Search.Documents* client library to create, load, and query a search index using sample data for [full text search](../../search-lucene-query-architecture.md). Full text search uses Apache Lucene for indexing and queries, and a BM25 ranking algorithm for scoring results.
1111

12-
This quickstart creates and queries a small hotels-quickstart index containing data about 4 hotels.
12+
This quickstart creates and queries a small hotels-quickstart index containing data about four hotels.
1313

14-
## Prerequisites
15-
16-
+ An Azure account with an active subscription. You can [create an account for free](https://azure.microsoft.com/pricing/purchase-options/azure-account?icid=azurefreeaccount).
17-
18-
+ An Azure AI Search service. [Create a service](../../search-create-service-portal.md) if you don't have one. You can use a free tier for this quickstart.
19-
20-
+ An API key and service endpoint for your service. Sign in to the [Azure portal](https://portal.azure.com) and [find your search service](https://portal.azure.com/#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/CognitiveSearch).
21-
22-
In the **Overview** section, copy the URL and save it to a text editor for a later step. An example endpoint might look like `https://mydemo.search.windows.net`.
23-
24-
In the **Settings** > **Keys** section, copy and save an admin key for full rights to create and delete objects. There are two interchangeable primary and secondary keys. Choose either one.
25-
26-
:::image type="content" source="../../media/search-get-started-rest/get-url-key.png" alt-text="Screenshot that shows the HTTP endpoint and the primary and secondary API key locations.":::

articles/search/includes/quickstarts/full-text-java.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,28 @@ author: eric-urban
44
ms.author: eur
55
ms.service: azure-ai-search
66
ms.topic: include
7-
ms.date: 2/8/2025
7+
ms.date: 2/12/2025
88
---
99

1010
[!INCLUDE [Full text introduction](full-text-intro.md)]
1111

12-
Build a Java console application using the [Azure.Search.Documents](/java/api/overview/azure/search) library to create, load, and query a search index.
12+
> [!TIP]
13+
> You can [download the source code](https://github.com/Azure-Samples/azure-search-java-samples/tree/main/quickstart) to start with a finished project or follow these steps to create your own.
1314
14-
Alternatively, you can [download the source code](https://github.com/Azure-Samples/azure-search-java-samples/tree/main/quickstart) to start with a finished project or follow these steps to create your own.
15+
## Prerequisites
16+
17+
- An active Azure subscription - <a href="https://azure.microsoft.com/free/cognitive-services" target="_blank">Create one for free</a>
18+
- An Azure AI Search service. [Create a service](../../search-create-service-portal.md) if you don't have one. You can use a free tier for this quickstart.
19+
20+
## Microsoft Entra ID prerequisites
21+
22+
For the recommended keyless authentication with Microsoft Entra ID, you need to:
23+
- Install the [Azure CLI](/cli/azure/install-azure-cli) used for keyless authentication with Microsoft Entra ID.
24+
- Assign both of the `Search Service Contributor` and `Search Index Data Contributor` roles to your user account. You can assign roles in the Azure portal under **Access control (IAM)** > **Add role assignment**. For more information, see [Connect to Azure AI Search using roles](../../search-security-rbac.md).
25+
26+
## Retrieve resource information
27+
28+
[!INCLUDE [resource authentication](../resource-authentication.md)]
1529

1630
## Set up your environment
1731

@@ -59,7 +73,7 @@ Use the following tools to create this quickstart.
5973

6074
## Specify Maven dependencies
6175

62-
1. Open the *pom.xml* file and add the following dependencies.
76+
1. Open the *pom.xml* file and add the following dependencies. This includes the [Azure.Search.Documents](/java/api/overview/azure/search) library.
6377

6478
```xml
6579
<dependencies>

articles/search/includes/quickstarts/full-text-javascript.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,28 @@ author: eric-urban
44
ms.author: eur
55
ms.service: azure-ai-search
66
ms.topic: include
7-
ms.date: 2/8/2025
7+
ms.date: 2/12/2025
88
---
99

1010
[!INCLUDE [Full text introduction](full-text-intro.md)]
1111

12-
Build a Node.js application using the [@azure/search-documents](/javascript/api/overview/azure/search-documents-readme) library to create, load, and query a search index.
12+
> [!TIP]
13+
> You can [download the source code](https://github.com/Azure-Samples/azure-search-javascript-samples/tree/main/quickstart) to start with a finished project or follow these steps to create your own.
1314
14-
Alternatively, you can [download the source code](https://github.com/Azure-Samples/azure-search-javascript-samples/tree/main/quickstart) to start with a finished project or follow these steps to create your own.
15+
## Prerequisites
16+
17+
- An active Azure subscription - <a href="https://azure.microsoft.com/free/cognitive-services" target="_blank">Create one for free</a>
18+
- An Azure AI Search service. [Create a service](../../search-create-service-portal.md) if you don't have one. You can use a free tier for this quickstart.
19+
20+
## Microsoft Entra ID prerequisites
21+
22+
For the recommended keyless authentication with Microsoft Entra ID, you need to:
23+
- Install the [Azure CLI](/cli/azure/install-azure-cli) used for keyless authentication with Microsoft Entra ID.
24+
- Assign both of the `Search Service Contributor` and `Search Index Data Contributor` roles to your user account. You can assign roles in the Azure portal under **Access control (IAM)** > **Add role assignment**. For more information, see [Connect to Azure AI Search using roles](../../search-security-rbac.md).
25+
26+
## Retrieve resource information
27+
28+
[!INCLUDE [resource authentication](../resource-authentication.md)]
1529

1630
## Set up your environment
1731

articles/search/includes/quickstarts/full-text-python.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,28 @@ author: eric-urban
44
ms.author: eur
55
ms.service: azure-ai-search
66
ms.topic: include
7-
ms.date: 2/8/2025
7+
ms.date: 2/12/2025
88
---
99

1010
[!INCLUDE [Full text introduction](full-text-intro.md)]
1111

12-
Use a Jupyter notebook and the [azure-search-documents](/python/api/overview/azure/search-documents-readme) library in the Azure SDK for Python to create, load, and query a search index.
12+
> [!TIP]
13+
> You can download and run a [finished notebook](https://github.com/Azure-Samples/azure-search-python-samples/tree/main/Quickstart).
1314
14-
Alternatively, you can download and run a [finished notebook](https://github.com/Azure-Samples/azure-search-python-samples/tree/main/Quickstart).
15+
## Prerequisites
16+
17+
- An active Azure subscription - <a href="https://azure.microsoft.com/free/cognitive-services" target="_blank">Create one for free</a>
18+
- An Azure AI Search service. [Create a service](../../search-create-service-portal.md) if you don't have one. You can use a free tier for this quickstart.
19+
20+
## Microsoft Entra ID prerequisites
21+
22+
For the recommended keyless authentication with Microsoft Entra ID, you need to:
23+
- Install the [Azure CLI](/cli/azure/install-azure-cli) used for keyless authentication with Microsoft Entra ID.
24+
- Assign both of the `Search Service Contributor` and `Search Index Data Contributor` roles to your user account. You can assign roles in the Azure portal under **Access control (IAM)** > **Add role assignment**. For more information, see [Connect to Azure AI Search using roles](../../search-security-rbac.md).
25+
26+
## Retrieve resource information
27+
28+
[!INCLUDE [resource authentication](../resource-authentication.md)]
1529

1630
## Set up your environment
1731

articles/search/includes/quickstarts/full-text-typescript.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,28 @@ author: eric-urban
44
ms.author: eur
55
ms.service: azure-ai-search
66
ms.topic: include
7-
ms.date: 2/8/2025
7+
ms.date: 2/12/2025
88
---
99

1010
[!INCLUDE [Full text introduction](full-text-intro.md)]
1111

12-
Build a Node.js application using the [@azure/search-documents](/javascript/api/overview/azure/search-documents-readme) library to create, load, and query a search index.
12+
> [!TIP]
13+
> You can [download the source code](https://github.com/Azure-Samples/azure-search-javascript-samples/tree/main/quickstart) to start with a finished project or follow these steps to create your own.
1314
14-
Alternatively, you can [download the source code](https://github.com/Azure-Samples/azure-search-javascript-samples/tree/main/quickstart) to start with a finished project or follow these steps to create your own.
15+
## Prerequisites
16+
17+
- An active Azure subscription - <a href="https://azure.microsoft.com/free/cognitive-services" target="_blank">Create one for free</a>
18+
- An Azure AI Search service. [Create a service](../../search-create-service-portal.md) if you don't have one. You can use a free tier for this quickstart.
19+
20+
## Microsoft Entra ID prerequisites
21+
22+
For the recommended keyless authentication with Microsoft Entra ID, you need to:
23+
- Install the [Azure CLI](/cli/azure/install-azure-cli) used for keyless authentication with Microsoft Entra ID.
24+
- Assign both of the `Search Service Contributor` and `Search Index Data Contributor` roles to your user account. You can assign roles in the Azure portal under **Access control (IAM)** > **Add role assignment**. For more information, see [Connect to Azure AI Search using roles](../../search-security-rbac.md).
25+
26+
## Retrieve resource information
27+
28+
[!INCLUDE [resource authentication](../resource-authentication.md)]
1529

1630
## Set up your environment
1731

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
author: eric-urban
3+
ms.author: eur
4+
ms.service: azure-ai-search
5+
ms.topic: include
6+
ms.date: 2/12/2025
7+
---
8+
9+
You need to retrieve the following information to authenticate your application with your Azure AI Search service:
10+
11+
#### [Microsoft Entra ID](#tab/keyless)
12+
13+
|Variable name | Value |
14+
|--------------------------|-------------|
15+
| `SEARCH_API_ENDPOINT` | This value can be found in the Azure portal. Select your search service and then from the left menu, select **Overview**. The **Url** value under **Essentials** is the endpoint that you need. An example endpoint might look like `https://mydemo.search.windows.net`. |
16+
17+
Learn more about [keyless authentication](/azure/search/keyless-connections) and [setting environment variables](/azure/ai-services/cognitive-services-environment-variables).
18+
19+
#### [API key](#tab/api-key)
20+
21+
|Variable name | Value |
22+
|--------------------------|-------------|
23+
| `SEARCH_API_ENDPOINT` | This value can be found in the Azure portal. Select your search service and then from the left menu, select **Overview**. The **Url** value under **Essentials** is the endpoint that you need. An example endpoint might look like `https://mydemo.search.windows.net`. |
24+
| `SEARCH_API_KEY` | This value can be found in the Azure portal. Select your search service and then from the left menu, select **Settings** > **Keys**. You can use either `KEY1` or `KEY2`.|
25+
26+
Learn more about [finding API keys](/azure/search/search-security-api-keys) and [setting environment variables](/azure/ai-services/cognitive-services-environment-variables).
27+
28+
[!INCLUDE [Azure key vault](~/reusable-content/ce-skilling/azure/includes/ai-services/security/azure-key-vault.md)]
29+
30+
---
31+
32+
33+

articles/search/search-get-started-text.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ms.custom:
1515
- ignite-2023
1616
ms.topic: quickstart
1717
zone_pivot_groups: search-quickstart-full-text
18-
ms.date: 2/8/2025
18+
ms.date: 2/12/2025
1919
---
2020

2121
# Quickstart: Full text search using the Azure SDKs

0 commit comments

Comments
 (0)