You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> You can [download the source code](https://github.com/Azure-Samples/azure-search-dotnet-samples/tree/main/quickstart-semantic-search/SemanticSearchQuickstart) to start with a finished project or follow these steps to create your own.
15
-
16
13
## Set up the client
17
14
18
15
In this quickstart, you use an IDE and the [**Azure.Search.Documents**](/dotnet/api/overview/azure/search.documents-readme) client library to add semantic ranking to an existing search index.
19
16
20
17
We recommend [Visual Studio](https://visualstudio.microsoft.com/vs/community/) for this quickstart.
21
18
19
+
> [!TIP]
20
+
> You can [download the source code](https://github.com/Azure-Samples/azure-search-dotnet-samples/tree/main/quickstart-semantic-search/SemanticSearchQuickstart) to start with a finished project or follow these steps to create your own.
21
+
22
22
### Install libraries
23
23
24
24
1. Start Visual Studio and open the [quickstart-semantic-search.sln](https://github.com/Azure-Samples/azure-search-dotnet-samples/tree/main/quickstart-semantic-search) or create a new project using a console application template.
> You can [download a finished notebook](https://github.com/Azure-Samples/azure-search-python-samples/tree/main/Quickstart-Semantic-Search) to start with a finished project or follow these steps to create your own.
15
-
16
13
## Set up the client
17
14
18
15
In this quickstart, use a Jupyter notebook and the [**azure-search-documents**](/python/api/overview/azure/search-documents-readme) library in the Azure SDK for Python to learn about semantic ranking.
19
16
20
17
We recommend [Visual Studio Code](https://code.visualstudio.com/download) with Python 3.10 or later and the [Python extension](https://code.visualstudio.com/docs/languages/python) for this quickstart.
21
18
19
+
> [!TIP]
20
+
> You can [download a finished notebook](https://github.com/Azure-Samples/azure-search-python-samples/tree/main/Quickstart-Semantic-Search) to start with a finished project or follow these steps to create your own.
21
+
22
22
We recommend a virtual environment for this quickstart:
23
23
24
24
1. Start Visual Studio Code.
@@ -122,73 +122,72 @@ In this section, you update a search index to include a semantic configuration.
122
122
123
123
1. Add a semantic configuration to an existing hotels-sample-index on your search service. No search documents are deleted by this operation and your index is still operational after the configuration is added.
124
124
125
-
```python
126
-
# Add semantic configuration to hotels-sample-index and display updated index details
127
-
from azure.search.documents.indexes.models import (
> You can [download the source code](https://github.com/Azure-Samples/azure-search-rest-samples/tree/main/Quickstart-semantic-search) to start with a finished project or follow these steps to create your own.
14
-
15
12
## Set up the client
16
13
17
14
In this quickstart, you use a REST client and the [Azure AI Search REST APIs](/rest/api/searchservice) to configure and use a semantic ranker.
18
15
19
16
We recommend [Visual Studio Code](https://code.visualstudio.com/download) with a [REST client extension](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) for this quickstart.
20
17
18
+
> [!TIP]
19
+
> You can [download the source code](https://github.com/Azure-Samples/azure-search-rest-samples/tree/main/Quickstart-semantic-search) to start with a finished project or follow these steps to create your own.
20
+
21
21
1. Start Visual Studio Code and open the [semantic-search-index-update.rest](https://github.com/Azure-Samples/azure-search-rest-samples/blob/main/Quickstart-semantic-search/semantic-search-index-update.rest) file or create a new file.
22
22
23
23
1. At the top, set environment variables for your search service, authorization, and index name.
@@ -26,18 +26,20 @@ We recommend [Visual Studio Code](https://code.visualstudio.com/download) with a
26
26
27
27
+ For @personalAccessToken, follow the instructions in [Connect without keys](../../search-get-started-rbac.md) to get your personal access token.
28
28
29
-
1. To test the connection, send your first request.
30
-
31
-
:::image type="content" source="../../media/search-get-started-semantic/visual-studio-code-send-request.png" alt-text="Screenshot of the REST client send request link.":::
32
-
33
-
This GET request returns a list of existing indexes. You should get an HTTP 200 Success status code and a list of indexes, including hotels-sample-index used in this quickstart.
29
+
1. To test the connection, send your first request.
34
30
35
31
```http
36
32
### List existing indexes by name (verify the connection)
37
33
GET {{searchUrl}}/indexes?api-version=2025-05-01-preview&$select=name HTTP/1.1
38
34
Authorization: Bearer {{personalAccessToken}}
39
35
```
40
36
37
+
1. Select **Sent request**.
38
+
39
+
:::image type="content" source="../../media/search-get-started-semantic/visual-studio-code-send-request.png" alt-text="Screenshot of the REST client send request link.":::
40
+
41
+
1. Output for this GET request returns a list of existing indexes. You should get an HTTP 200 Success status code and a list of indexes, including hotels-sample-index used in this quickstart.
42
+
41
43
## Update the index
42
44
43
45
To update an index using the REST API, you must provide the entire schema, plus the modifications you want to make. This request provides hotels-sample-index schema, plus the semantic configuration. The modification consists of the following JSON.
@@ -59,8 +61,7 @@ To update an index using the REST API, you must provide the entire schema, plus
59
61
}
60
62
```
61
63
62
-
The full POST request specifies the index name, operation, and full JSON schema. All required elements of the schema must be present. For this task, we recommend a GET to return the schema, and then adding your modifications.
63
-
64
+
The full POST request specifies the index name, operation, and full JSON schema. All required elements of the schema must be present. This request includes the full schema for hotels-sample-index plus the semantic configuration.
64
65
```http
65
66
POST {{searchUrl}}/indexes?api-version=2025-05-01-preview HTTP/1.1
0 commit comments