Skip to content

Commit 8a44d1d

Browse files
committed
Fixed upgrade REST API docs
1 parent 21ee526 commit 8a44d1d

File tree

1 file changed

+45
-25
lines changed

1 file changed

+45
-25
lines changed

articles/search/search-api-migration.md

Lines changed: 45 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,41 +11,35 @@ ms.custom:
1111
- ignite-2023
1212
- build-2024
1313
ms.topic: conceptual
14-
ms.date: 05/09/2024
14+
ms.date: 06/03/2024
1515
---
1616

1717
# Upgrade to the latest REST API in Azure AI Search
1818

1919
Use this article to migrate data plane calls to newer versions of the [**Search REST APIs**](/rest/api/searchservice/).
2020

21-
+ [**2023-11-01**](/rest/api/searchservice/search-service-api-versions#2023-11-01) is the most recent stable version. Semantic ranking and support for vector indexing and queries are generally available in this version.
21+
+ [**`2023-11-01`**](/rest/api/searchservice/search-service-api-versions#2023-11-01) is the most recent stable version.
2222

23-
If you're upgrading from 2023-10-01-preview to 2023-11-01, there are no breaking changes, but there's one behavior difference: the `vectorFilterMode` default changed from postfilter to prefilter for [filter expressions](vector-search-filters.md). If your 2023-10-01-preview code doesn't set `vectorFilterMode` explicitly, make sure you understand the new default behavior, or explicitly set `vectorFilterMode` to postfilter to retain the old behavior.
23+
+ [**`2024-05-01-preview`**](/rest/api/searchservice/search-service-api-versions#2023-10-01-preview) is the most recent preview API version.
2424

25-
+ [**2024-05-01-preview**](/rest/api/searchservice/search-service-api-versions#2023-10-01-preview) is the most recent preview API version. It adds a binary data type for vector fields, relevance properties for better search results, OneLake files indexer, more vectorizers, and more embedding skills. AzureOpenAIEmbedding skill is updated to include `dimensions` and `modelName` properties. The only backwards compatibility issue between this preview and the previous two previews is that `modelName` is now required.
26-
27-
+ [**2024-03-01-preview**](/rest/api/searchservice/search-service-api-versions#2023-10-01-preview) adds new data types and properties for compression, but is otherwise fully backward compatible with 2023-10-01-preview. There are no upgrade instructions for using this preview.
28-
29-
+ [**2023-10-01-preview**](/rest/api/searchservice/search-service-api-versions#2023-10-01-preview) is the first preview version that added [built-in query vectorization](vector-search-how-to-configure-vectorizer.md), [built-in data chunking and vectorization during indexing](vector-search-integrated-vectorization.md) (uses the [Text Split](cognitive-search-skill-textsplit.md) skill and [Azure OpenAI Embedding](cognitive-search-skill-azure-openai-embedding.md) skill). It introduces breaking changes in vector configuration in the index and vector queries.
30-
31-
+ **2023-07-01-preview** was the first REST API for vector support. It's now deprecated and you should migrate to either **2023-11-01** or any of the newer preview REST APIs immediately.
25+
**`2023-07-01-preview`** was the first REST API for vector support. It's now deprecated and you should migrate to either stable or newer preview REST APIs immediately.
3226

3327
> [!NOTE]
34-
> REST API reference docs are now versioned. To get the right content, open a reference page and then filter by version, using the selector located above the table of contents.
28+
> REST API reference docs are now versioned. To get version-specific content, open a reference page and then filter by version, using the selector located above the table of contents.
3529
3630
## When to upgrade
3731

3832
Azure AI Search breaks backward compatibility as a last resort. Upgrade is necessary when:
3933

40-
+ Your code references a retired or deprecated API version and is subject to one or more of the breaking changes. API versions that fall into this category include [2023-07-10-preview](#code-upgrade-for-vector-indexes-and-queries) for vectors, and [2019-05-06](#upgrade-to-2019-05-06) for obsolete skills and workarounds.
34+
+ Your code references a retired or deprecated API version and is subject to one or more breaking changes. You must address breaking changes if your code targets [`2023-07-10-preview`](#code-upgrade-for-vector-indexes-and-queries) for vectors, [`2020-06-01-preview]`(#breaking-change-for-semantic-ranking) for semantic ranking, and [`2019-05-06`](#upgrade-to-2019-05-06) for obsolete skills and workarounds.
4135

4236
+ Your code fails when unrecognized properties are returned in an API response. As a best practice, your application should ignore properties that it doesn't understand.
4337

4438
+ Your code persists API requests and tries to resend them to the new API version. For example, this might happen if your application persists continuation tokens returned from the Search API (for more information, look for `@search.nextPageParameters` in the [Search API Reference](/rest/api/searchservice/Search-Documents)).
4539

4640
## Breaking change for client code that reads connection information
4741

48-
Effective March 29, 2024 and applies to all [supported REST APIs](/rest/api/searchservice/search-service-api-versions):
42+
Effective March 29, 2024 and applicable to all [supported REST APIs](/rest/api/searchservice/search-service-api-versions):
4943

5044
+ [GET Skillset](/rest/api/searchservice/skillsets/get), [GET Index](/rest/api/searchservice/indexes/get), and [GET Indexer](/rest/api/searchservice/indexers/get) no longer return keys or connection properties in a response. This is a breaking change if you have downstream code that reads keys or connections (sensitive data) from a GET response.
5145

@@ -55,40 +49,66 @@ Effective March 29, 2024 and applies to all [supported REST APIs](/rest/api/sear
5549

5650
## Breaking change for semantic ranking
5751

58-
[Semantic ranking](semantic-search-overview.md) is generally available in 2023-11-01. In contrast with previous REST API versions, it no longer uses the `queryLanguage` property. It also requires a `semanticConfiguration` definition that replaces the `searchFields` in early previous versions. See [Migrate from preview version](semantic-how-to-configure.md#migrate-from-preview-versions) to transition your code to the generally available version or to a newer preview version.
52+
[Semantic ranking](semantic-search-overview.md) is generally available in `2023-11-01`. Here are the breaking changes for semantic ranking from earlier releases:
53+
54+
+ In all versions after `2020-06-01-preview`: `semanticConfiguration` replaces `searchFields` as the mechanism for specifying which fields to use for L2 ranking.
55+
56+
+ For all API versions, updates on July 14, 2023 to the Microsoft-hosteed semantic models made semantic ranking language-agnostic, effectively decommissioning the `queryLanguage` property. There's no "breaking change" in code, but the property is ignored.
57+
58+
See [Migrate from preview version](semantic-how-to-configure.md#migrate-from-preview-versions) to transition your code to use `semanticConfiguration`.
59+
60+
## Upgrade from 2024-03-01-preview
61+
62+
[`2024-03-01-preview`](/rest/api/searchservice/search-service-api-versions#2023-10-01-preview) adds new data types and properties for compression.
63+
64+
If you're upgrading from `2024-03-01-preview`, the AzureOpenAIEmbedding skill now requires a model name and dimensions property.
65+
66+
1. Search your codebase for [AzureOpenAIEmbedding](cognitive-search-skill-azure-openai-embedding.md) references.
67+
68+
1. Set `modelName` to "text-embedding-ada-002" and set `dimensions` to "1536".
69+
70+
## Upgrade from 2023-10-01-preview
71+
72+
[`2023-10-01-preview`](/rest/api/searchservice/search-service-api-versions#2023-10-01-preview) was the first preview version to add [built-in data chunking and vectorization during indexing](vector-search-integrated-vectorization.md) and [built-in query vectorization](vector-search-how-to-configure-vectorizer.md).
73+
74+
If your code currently targets `2023-10-01-preview`, you can target `2023-11-01` or `2024-03-01-preview` with no breaking changes. However, there's one behavior difference: for `2023-11-01` and newer previews, the `vectorFilterMode` default changed from postfilter to prefilter for [filter expressions](vector-search-filters.md).
75+
76+
1. Search your codebase for `vectorFilterMode` references.
77+
78+
1. If the property is explicitly set, no action is required. If you used the default, be aware that the new default behavior is to filter before query execution. If you want post-query filtering, explicitly set `vectorFilterMode` to postfilter to retain the old behavior.
5979

6080
## Upgrade from 2023-07-01-preview
6181

62-
This section explains the migration path from 2023-07-01-preview to any newer API version. There are several breaking changes from 2023-07-01-preview to any newer version, but only minor compatibility issues between the newer API versions that follow.
82+
This section explains the migration path from 2023-07-01-preview to any newer API version. There are multiple breaking changes from `2023-07-01-preview` to any newer version.
6383

6484
Upgrade instructions focus on code changes that get you through breaking changes from previous versions so that existing code runs the same as before, but on the newer API version. Once your code is in working order, you can decide whether to adopt newer features. To learn more about preview features, see [vector code samples](https://github.com/Azure/azure-search-vector-samples) and [What's New](whats-new.md).
6585

6686
### Portal upgrade for vector indexes
6787

68-
Azure portal supports a one-click upgrade path for 2023-07-01-preview indexes. The portal detects 2023-07-01-preview vector fields and provides a **Migrate** button.
88+
Azure portal supports a one-click upgrade path for `2023-07-01-preview` indexes. It detects vector fields and provides a **Migrate** button.
6989

70-
+ Migration path is from 2023-07-01-preview to 2023-10-01-preview.
90+
+ Migration path is from `2023-07-01-preview` to `2024-05-01-preview`.
7191
+ Updates are limited to vector field definitions and vector search algorithm configurations.
72-
+ Updates are one-way. You can't reverse the upgrade. Once the index is upgraded, you must use 2023-10-01-preview or later to query the index.
92+
+ Updates are one-way. You can't reverse the upgrade. Once the index is upgraded, you must use `2024-05-01-preview` or later to query the index.
7393

7494
There's no portal migration for upgrading vector query syntax. See [code upgrades](#code-upgrade-for-vector-indexes-and-queries) for query syntax changes.
7595

76-
Before selecting **Migrate**, select **Edit JSON** to review the updated schema first. You should find a schema that conforms to the changes described in the [code upgrade](#code-upgrade-for-vector-indexes-and-queries) section. Portal migration only handles indexes with one vector search algorithm configuration. It creates a default profile that maps to the 2023-07-01-preview vector search algorithm. Indexes with multiple vector search configurations require manual migration.
96+
Before selecting **Migrate**, select **Edit JSON** to review the updated schema first. You should find a schema that conforms to the changes described in the [code upgrade](#code-upgrade-for-vector-indexes-and-queries) section. Portal migration only handles indexes with one vector search algorithm configuration. It creates a default profile that maps to the `2023-07-01-preview` vector search algorithm. Indexes with multiple vector search configurations require manual migration.
7797

7898
### Code upgrade for vector indexes and queries
7999

80100
[Vector search](vector-search-overview.md) support was introduced in [Create or Update Index (2023-07-01-preview)](/rest/api/searchservice/preview-api/create-or-update-index).
81101

82-
Upgrading from 2023-07-01-preview to any newer stable or preview version requires:
102+
Upgrading from `2023-07-01-preview` to any newer stable or preview version requires:
83103

84104
+ Renaming and restructuring the vector configuration in the index
85105
+ Rewriting your vector queries
86106

87-
Use the instructions in this section to migrate vector fields, configuration, and queries from 2023-07-01-preview.
107+
Use the instructions in this section to migrate vector fields, configuration, and queries from `2023-07-01-preview`.
88108

89109
1. Call [Get Index](/rest/api/searchservice/indexes/get?view=rest-searchservice-2023-11-01&tabs=HTTP&preserve-view=true) to retrieve the existing definition.
90110

91-
1. Modify the vector search configuration. 2023-11-01 and later versions introduce the concept of *vector profiles* that bundle vector-related configurations under one name. Newer versions also rename `algorithmConfigurations` to `algorithms`.
111+
1. Modify the vector search configuration. `2023-11-01` and later versions introduce the concept of *vector profiles* that bundle vector-related configurations under one name. Newer versions also rename `algorithmConfigurations` to `algorithms`.
92112

93113
+ Rename `algorithmConfigurations` to `algorithms`. This is only a renaming of the array. The contents are backwards compatible. This means your existing HNSW configuration parameters can be used.
94114

@@ -189,7 +209,7 @@ Use the instructions in this section to migrate vector fields, configuration, an
189209
+ Rename `vectors` to `vectorQueries`.
190210
+ For each vector query, add `kind`, setting it to `vector`.
191211
+ For each vector query, rename `value` to `vector`.
192-
+ Optionally, add `vectorFilterMode` if you're using [filter expressions](vector-search-filters.md). The default is prefilter for indexes created after 2023-10-01. Indexes created before that date only support postfilter, regardless of how you set the filter mode.
212+
+ Optionally, add `vectorFilterMode` if you're using [filter expressions](vector-search-filters.md). The default is prefilter for indexes created after `2023-10-01`. Indexes created before that date only support postfilter, regardless of how you set the filter mode.
193213
194214
**Before (2023-07-01-preview)**:
195215
@@ -237,7 +257,7 @@ Use the instructions in this section to migrate vector fields, configuration, an
237257
}
238258
```
239259
240-
These steps complete the migration to 2023-11-01 stable API version or newer preview API versions.
260+
These steps complete the migration to `2023-11-01` stable API version or newer preview API versions.
241261
242262
## Upgrade to 2020-06-30
243263
@@ -284,7 +304,7 @@ API version `2019-05-06` added formal support for complex types. If your code im
284304
285305
+ The limits on the depth of subfields and the number of complex collections per index have been lowered. If you created indexes that exceed these limits using the preview api-versions, any attempt to update or recreate them using API version `2019-05-06` will fail. If you find yourself in this situation, you need to redesign your schema to fit within the new limits and then rebuild your index.
286306
287-
+ There's a new limit starting in api-version `2019-05-06` on the number of elements of complex collections per document. If you created indexes with documents that exceed these limits using the preview api-versions, any attempt to reindex that data using api-version `2019-05-06` will fail. If you find yourself in this situation, you need to reduce the number of complex collection elements per document before reindexing your data.
307+
+ There's a new limit starting in api-version `2019-05-06` on the number of elements of complex collections per document. If you created indexes with documents that exceed these limits using the preview api-versions, any attempt to reindex that data using api-version `2019-05-06` fails. If you find yourself in this situation, you need to reduce the number of complex collection elements per document before reindexing your data.
288308
289309
For more information, see [Service limits for Azure AI Search](search-limits-quotas-capacity.md).
290310

0 commit comments

Comments
 (0)