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
Copy file name to clipboardExpand all lines: articles/search/search-howto-reindex.md
+43-9Lines changed: 43 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,17 +14,17 @@ ms.date: 07/01/2024
14
14
15
15
# Update or rebuild an index in Azure AI Search
16
16
17
-
This article explains how to update an existing index in Azure AI Search with incremental indexing. It explains the circumstances under which rebuilds are required, and provides recommendations for mitigating the effects of rebuilds on ongoing query requests.
17
+
This article explains how to update an existing index in Azure AI Search with schema changes or content changes through incremental indexing. It explains the circumstances under which rebuilds are required, and provides recommendations for mitigating the effects of rebuilds on ongoing query requests.
18
18
19
19
During active development, it's common to drop and rebuild indexes when you're iterating over index design. Most developers work with a small representative sample of their data so that reindexing goes faster.
20
20
21
-
For applications already in production, we recommend creating a new index that runs side by side an existing index to avoid query downtime and using an [index alias](search-how-to-alias.md) to avoid changing your application code.
21
+
For schema changes on applications already in production, we recommend creating and testing a new index that runs side by side an existing index. Use an [index alias](search-how-to-alias.md) to swap in the new index while avoiding changes your application code.
22
22
23
23
## Update content
24
24
25
-
Incremental indexing and synchronizing an index against changes in source data is a basic requirement for most search applications. This section explains the workflow for overwriting field contents in a search index.
25
+
Incremental indexing and synchronizing an index against changes in source data is fundamental to most search applications. This section explains the workflow for updating field contents in a search index.
26
26
27
-
1. Use the same techniques for loading documents: [Documents - Index (REST)](/rest/api/searchservice/documents) or an equivalent API in the Azure SDKs. For more information about indexing, see [Load documents](search-how-to-load-search-index.md).
27
+
1. Use the same techniques for loading documents: [Documents - Index (REST)](/rest/api/searchservice/documents) or an equivalent API in the Azure SDKs. For more information about indexing techniques, see [Load documents](search-how-to-load-search-index.md).
28
28
29
29
1. Set the `@search.action` parameter to determine the effect on existing documents:
30
30
@@ -41,13 +41,47 @@ Queries continue to run, but if you're updating or removing existing fields, you
41
41
42
42
## Tips for incremental indexing
43
43
44
-
+Use `mergeOrUpload` as the search action.
44
+
+[Indexers automate incremental indexing](search-indexer-overview.md). If you can use an indexer, and if the data source supports change tracking, you can run the indexer on a recurring schedule to add, update, or overwrite searchable content so that it's synchronized to your external data.
45
45
46
-
+The payload must include the keys or identifiers of every document you want to add, update, or delete.
46
+
+If you're making index calls directly, use `mergeOrUpload` as the search action.
47
47
48
-
+For merging, avoid listing fields that contain content you want to preserve. For example, if you populated vector fields, but only need to update a few nonvector fields, the payload should list just those fields you want to update. Specifying an empty field overwrites the existing value with a null value.
48
+
+The payload must include the keys or identifiers of every document you want to add, update, or delete.
49
49
50
-
+[Indexers automate incremental indexing](search-indexer-overview.md). If you can use an indexer, and if the data source supports change tracking, you can run the indexer on a recurring schedule to add, update, and delete an index so that it's synchronized to your external data.
50
+
+ To update the contents of simple fields and subfields in complex types, list only the fields you want to change. For example, if you only need to update a description field, the payload should consist of the document key and the modified description. Omitting other fields retains their existing values.
51
+
52
+
+ To merge the inline changes into string collection, provide the entire value. Recall the `tags` field example from the previous section. New values overwrite the old values, and there's no merging at the field content level.
53
+
54
+
Here's a [REST API example](search-get-started-rest.md) demonstrating these tips:
55
+
56
+
```rest
57
+
### Get Secret Point Hotel by ID
58
+
GET {{baseUrl}}/indexes/hotels-vector-quickstart/docs('1')?api-version=2023-11-01 HTTP/1.1
59
+
Content-Type: application/json
60
+
api-key: {{apiKey}}
61
+
62
+
### Change the description and city for Secret Point Hotel
63
+
POST {{baseUrl}}/indexes/hotels-vector-quickstart/docs/search.index?api-version=2023-11-01 HTTP/1.1
64
+
Content-Type: application/json
65
+
api-key: {{apiKey}}
66
+
67
+
{
68
+
"value": [
69
+
{
70
+
"@search.action": "mergeOrUpload",
71
+
"HotelId": "1",
72
+
"Description": "Change the description and city for Secret Point Hotel. Keep everything else."
73
+
"Address": {
74
+
"City": "Miami"
75
+
}
76
+
}
77
+
]
78
+
}
79
+
80
+
### Retrieve the same document, confirm the overwrites and retention of all other values
81
+
GET {{baseUrl}}/indexes/hotels-vector-quickstart/docs('1')?api-version=2023-11-01 HTTP/1.1
82
+
Content-Type: application/json
83
+
api-key: {{apiKey}}
84
+
```
51
85
52
86
## Change an index schema
53
87
@@ -123,7 +157,7 @@ The Azure portal provides index size and vector index size. You can check these
123
157
124
158
Azure AI Search supports document-level operations so that you can look up, update, and delete a specific document in isolation. The following example shows how to delete a document.
125
159
126
-
Recall that deleted documents don't immediately free up space in the index. Every few minutes, a background process performs the physical deletion. Whether you use the portal or an API to return index statistics, you can expect a small delay before the deletion is reflected in the portal and through APIs.
160
+
Deleting a document doesn't immediately free up space in the index. Every few minutes, a background process performs the physical deletion. Whether you use the portal or an API to return index statistics, you can expect a small delay before the deletion is reflected in the portal and API metrics.
127
161
128
162
1. Identify which field is the document key. In the portal, you can view the fields of each index. Document keys are string fields and are denoted with a key icon to make them easier to spot.
Copy file name to clipboardExpand all lines: articles/search/search-security-enable-roles.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,10 +25,10 @@ Roles for service administration (control plane) are built in and can't be enabl
25
25
26
26
## Prerequisites
27
27
28
-
+ Owner, User Access Administrator, or a custom role with [Microsoft.Authorization/roleAssignments/write](/azure/templates/microsoft.authorization/roleassignments) permissions.
29
-
30
28
+ A search service in any region, on any tier, including free.
31
29
30
+
+ Owner, User Access Administrator, or a custom role with [Microsoft.Authorization/roleAssignments/write](/azure/templates/microsoft.authorization/roleassignments) permissions.
31
+
32
32
## Enable role-based access for data plane operations
33
33
34
34
Configure your search service to recognize an **authorization** header on data requests that provide an OAuth2 access token.
Copy file name to clipboardExpand all lines: articles/search/search-security-rbac.md
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,10 +30,10 @@ Role-based access is optional, but recommended. The alternative is [key-based au
30
30
31
31
## Prerequisites
32
32
33
-
+**Owner**, **User Access Administrator**, or a custom role with [Microsoft.Authorization/roleAssignments/write](/azure/templates/microsoft.authorization/roleassignments) permissions.
34
-
35
33
+ A search service in any region, on any tier, [enabled for role-based access](search-security-enable-roles.md).
36
34
35
+
+ Owner, User Access Administrator, or a custom role with [Microsoft.Authorization/roleAssignments/write](/azure/templates/microsoft.authorization/roleassignments) permissions.
36
+
37
37
<aname = "built-in-roles-used-in-search"></a>
38
38
39
39
## Built-in roles used in Azure AI Search
@@ -51,7 +51,6 @@ The following roles are built in. If these roles are insufficient, [create a cus
51
51
52
52
Combine these roles to get sufficient permissions for your use case.
53
53
54
-
55
54
> [!NOTE]
56
55
> If you disable Azure role-based access, built-in roles for the control plane (Owner, Contributor, Reader) continue to be available. Disabling role-based access removes just the data-related permissions associated with those roles. If data plane roles are disabled, Search Service Contributor is equivalent to control-plane Contributor.
57
56
@@ -278,15 +277,15 @@ This approach assumes Visual Studio Code with a REST client extension.
278
277
az account get-access-token --query accessToken --output tsv
279
278
```
280
279
281
-
1.In a new text file in Visual Studio Code, paste in these variables:
280
+
1.Paste these variables in a new text file in Visual Studio Code.
282
281
283
282
```http
284
283
@baseUrl = PASTE-YOUR-SEARCH-SERVICE-URL-HERE
285
284
@index-name = PASTE-YOUR-INDEX-NAME-HERE
286
285
@token = PASTE-YOUR-TOKEN-HERE
287
286
```
288
287
289
-
1. Paste in and then send a request that uses the variables you've specified. For the "Search Index Data Reader" role, you can send a query. You can use any [supported API version](/rest/api/searchservice/search-service-api-versions).
288
+
1. Paste and then send a request that uses the variables you've specified. For the "Search Index Data Reader" role, you can send a query. You can use any [supported API version](/rest/api/searchservice/search-service-api-versions).
290
289
291
290
```http
292
291
POST https://{{baseUrl}}/indexes/{{index-name}}/docs/search?api-version=2023-11-01 HTTP/1.1
@@ -381,7 +380,7 @@ If you're already a Contributor or Owner of your search service, you can present
Copy file name to clipboardExpand all lines: articles/search/service-configure-firewall.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,9 +15,9 @@ ms.date: 06/27/2024
15
15
16
16
# Configure network access and firewall rules for Azure AI Search
17
17
18
-
This article explains how to configure network access to a search service's public endpoint. To block *all* data plane access to the public endpoint, use [private endpoints](service-create-private-endpoint.md) and an Azure virtual network.
18
+
This article explains how to restrict network access to a search service's public endpoint. To block *all* data plane access to the public endpoint, use [private endpoints](service-create-private-endpoint.md) and an Azure virtual network.
19
19
20
-
This article assumes the Azure portal to configure network access options. You can also use the [Management REST API](/rest/api/searchmanagement/), [Azure PowerShell](/powershell/module/az.search), or the [Azure CLI](/cli/azure/search).
20
+
This article assumes the Azure portal for configuring network access options. You can also use the [Management REST API](/rest/api/searchmanagement/), [Azure PowerShell](/powershell/module/az.search), or the [Azure CLI](/cli/azure/search).
21
21
22
22
## Prerequisites
23
23
@@ -29,7 +29,9 @@ This article assumes the Azure portal to configure network access options. You c
29
29
30
30
By default, Azure AI Search is configured to allow connections over a public endpoint. Access to a search service *through* the public endpoint is protected by authentication and authorization protocols, but the endpoint itself is open to the internet at the network layer for data plane requests.
31
31
32
-
If you aren't hosting a public web site, you might want to configure network access to automatically refuse requests unless they originate from an approved set of devices and cloud services. There are two mechanisms:
32
+
If you aren't hosting a public web site, you might want to configure network access to automatically refuse requests unless they originate from an approved set of devices and cloud services.
33
+
34
+
There are two mechanisms for restricting access to the public endpoint:
33
35
34
36
+ Inbound rules listing the IP addresses, ranges, or subnets from which requests are admitted
35
37
+ Exceptions to network rules, where requests are admitted with no checks, as long as the request originates from a [trusted service](#grant-access-to-trusted-azure-services)
@@ -44,7 +46,7 @@ There are a few drawbacks to locking down the public endpoint.
44
46
45
47
+ It takes time to fully identify IP ranges and set up firewalls, and if you're in early stages of proof-of-concept testing and investigation and using sample data, you might want to defer network access controls until you actually need them.
46
48
47
-
+ Some workflows require access to a public endpoint. Specifically, the import wizards in the Azure portal, such as the [Import data wizard](search-get-started-portal.md)and [Import and vectorize data wizard](search-get-started-portal-import-vectors.md), connect to built-in (hosted) sample data and embedding models over the public endpoint. You can switch to code or script to complete the same tasks with firewall rules in place, but if you want to run the wizards, the public endpoint must be available. For more information, see [Secure connections in the import wizards](search-import-data-portal.md#secure-connections).
49
+
+ Some workflows require access to a public endpoint. Specifically, the [**import wizards**](search-import-data-portal.md)in the Azure portal connect to built-in (hosted) sample data and embedding models over the public endpoint. You can switch to code or script to complete the same tasks when firewall rules in place, but if you want to run the wizards, the public endpoint must be available. For more information, see [Secure connections in the import wizards](search-import-data-portal.md#secure-connections).
48
50
49
51
<aid="configure-ip-policy"></a>
50
52
@@ -62,7 +64,7 @@ There are a few drawbacks to locking down the public endpoint.
62
64
63
65
:::image type="content" source="media/service-configure-firewall/azure-portal-firewall-all.png" alt-text="Screenshot showing how to configure the IP firewall in the Azure portal.":::
64
66
65
-
1. Under **IP Firewall**, select **Add your client IP address** to create an inbound rule for the public IP address of your system. See [Allow access from the Azure portal IP address](#allow-access-from-the-azure-portal-ip-address) for details.
67
+
1. Under **IP Firewall**, select **Add your client IP address** to create an inbound rule for the public IP address of your personal device. See [Allow access from the Azure portal IP address](#allow-access-from-the-azure-portal-ip-address) for details.
66
68
67
69
1. Add other client IP addresses for other devices and services that send requests to a search service.
0 commit comments