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-how-to-alias.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ In Azure Cognitive Search, an alias is a secondary name that can be used to refe
19
19
20
20
The main goal of index aliases is to make it easier to manage your production indexes. For example, if you need to make a change to your index definition, such as editing a field or adding a new analyzer, you'll have to create a new search index because all search indexes are immutable. This means you either need to [drop and rebuild your index](search-howto-reindex.md) or create a new index and then migrate your application over to that index.
21
21
22
-
Index aliases make this easier because you can create a new index alongside your current index and then whenever you're ready to migrate over to the new index, all you need to is update the mapping in your alias and requests will automatically start going to the new index.
22
+
Index aliases make this easier because you can create a new index alongside your current index and then whenever you're ready to migrate over to the new index, all you need to do is update the mapping in your alias and requests will automatically start going to the new index.
23
23
24
24
A typical workflow for using index aliases would be to:
25
25
@@ -60,12 +60,12 @@ To create an alias in Visual Studio Code:
60
60
61
61
## Send requests
62
62
63
-
Once you've created your alias, you're ready to start using it. Aliases can be used for all [document operations](rest/api/searchservice/document-operations) including querying, indexing, suggestions, and autocomplete.
63
+
Once you've created your alias, you're ready to start using it. Aliases can be used for all [document operations](/rest/api/searchservice/document-operations) including querying, indexing, suggestions, and autocomplete.
64
64
65
-
In the query below, instead of sending the request to `hotel-samples-index` you can instead send the request to `my-alias` and it will be routed accordingly.
65
+
In the query below, instead of sending the request to `hotel-samples-index`, you can instead send the request to `my-alias` and it will be routed accordingly.
66
66
67
67
```http
68
-
POST /indexes/my-alias/docs/search?api-version=2020-06-30
68
+
POST /indexes/my-alias/docs/search?api-version=2021-04-30-preview
69
69
{
70
70
"search": "pool spa +airport",
71
71
"searchMode": any,
@@ -75,14 +75,14 @@ POST /indexes/my-alias/docs/search?api-version=2020-06-30
75
75
}
76
76
```
77
77
78
-
In your client-side application, you can use the alias name rather than the index name to route all requests to the proper index. The alias gives you an easy mechanism to update where your application's requests are being routed to.
78
+
If you expect that you may need to make updates to your index definition for your production indexes, you should use an alias rather than the index name for requests in your client-side application. Scenarios that require you to create a new index are outlined under these [rebuild conditions](search-howto-reindex.md#rebuild-conditions).
79
79
80
80
> [!NOTE]
81
-
> One area where aliases can't be used is with indexers: indexers don't support aliases so you can't include an alias as the `targetIndexName` on your indexer.
81
+
> You can only use an alias with [document operations](/rest/api/searchservice/document-operations). Aliases can't be used to get or update an index definition, can't be used with the Analyze Text API, and can't be used as the `targetIndexName` on an indexer.
82
82
83
83
## Swap indexes
84
84
85
-
Now, whenever you need to update your application to point to a new index, all you need to do is update the mapping in your alias. PUT is required for updates as described in [Create or Update Alias (REST preview)](rest/api/searchservice/preview-api/create-or-update-alias).
85
+
Now, whenever you need to update your application to point to a new index, all you need to do is update the mapping in your alias. PUT is required for updates as described in [Create or Update Alias (REST preview)](/rest/api/searchservice/preview-api/create-or-update-alias).
86
86
87
87
```http
88
88
PUT /aliases/my-alias?api-version=2021-04-30-preview
Copy file name to clipboardExpand all lines: articles/search/search-howto-reindex.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ ms.date: 01/10/2022
13
13
14
14
# Drop and rebuild an index in Azure Cognitive Search
15
15
16
-
This article explains how to drop and rebuild an Azure Cognitive Search index, the circumstances under which rebuilds are required, and recommendations for mitigating the impact of rebuilds on ongoing query requests. If you frequently have to rebuild your search index, we recommend using [index aliases](search-howto-alias.md) to make it easier to swap which index your application is pointing to.
16
+
This article explains how to drop and rebuild an Azure Cognitive Search index, the circumstances under which rebuilds are required, and recommendations for mitigating the impact of rebuilds on ongoing query requests. If you frequently have to rebuild your search index, we recommend using [index aliases](search-how-to-alias.md) to make it easier to swap which index your application is pointing to.
17
17
18
18
A search index is a collection of physical folders and field-based inverted indexes of your content, distributed in shards across the number of partitions allocated to your search index. In Azure Cognitive Search, you cannot drop and recreate individual fields. If you want to fully rebuild a field, all field storage must be deleted, recreated based on an existing or revised index schema, and then repopulated with data pushed to the index or pulled from external sources.
| Maximum number of rules per map |5000 |20000|20000 |20000 |20000 |20000 | 20000 | 20000 |
123
123
124
-
## Alias limits
124
+
## Index alias limits
125
125
126
-
Maximum number of aliases varies by tier. In all tiers, the maximum number of aliases is the same as the maximum number of indexes.
126
+
Maximum number of [index aliases](search-how-to-alias.md) varies by tier. In all tiers, the maximum number of aliases is the same as the maximum number of indexes.
|[Aliases](search-howto-alias.md)| An alias is a secondary name that can be used to refer to an index for querying, indexing, and other operations. You can create an alias that maps to a search index and substitute the alias name in places where you would otherwise reference an index name. This gives you added flexibility if you ever need to change which index your application is pointing to. Instead of updating the references to the index name in your application, you can just update the mapping for your alias. | Public preview REST APIs (no portal support at this time).|
21
+
|[Index aliases](search-how-to-alias.md)| An index alias is a secondary name that can be used to refer to an index for querying, indexing, and other operations. You can create an alias that maps to a search index and substitute the alias name in places where you would otherwise reference an index name. This gives you added flexibility if you ever need to change which index your application is pointing to. Instead of updating the references to the index name in your application, you can just update the mapping for your alias. | Public preview REST APIs (no portal support at this time).|
0 commit comments