Skip to content

Commit 7d7fd92

Browse files
author
Derek Legenzoff
committed
updating alias docs to reflect latest functionality:
1 parent 2ecccce commit 7d7fd92

File tree

4 files changed

+26
-11
lines changed

4 files changed

+26
-11
lines changed
184 KB
Loading
Binary file not shown.

articles/search/search-how-to-alias.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Instead of dropping and rebuilding your index, you can use index aliases. A typi
2929

3030
## Create an index alias
3131

32-
You can create an alias using the preview REST API, the preview SDKs, or through [Visual Studio Code](search-get-started-vs-code.md). An alias consists of the `name` of the alias and the name of the search index that the alias is mapped to. Only one index name can be specified in the `indexes` array.
32+
You can create an alias using the preview REST API, the preview SDKs, or through the [Azure portal](https://portal.azure.com). An alias consists of the `name` of the alias and the name of the search index that the alias is mapped to. Only one index name can be specified in the `indexes` array.
3333

3434
### [**REST API**](#tab/rest)
3535

@@ -43,15 +43,30 @@ POST /aliases?api-version=2021-04-30-preview
4343
}
4444
```
4545

46-
### [**Visual Studio Code**](#tab/vscode)
46+
### [**Azure portal**](#tab/portal)
4747

48-
To create an alias in Visual Studio Code:
49-
1. Follow the steps in the [Visual Studio Code Quickstart](search-get-started-vs-code.md) to install the [Azure Cognitive Search extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurecognitivesearch) and connect to your Azure Subscription.
50-
1. Navigate to your search service.
51-
1. Under your search service, right-click on **Aliases** and select **Create new alias**.
52-
1. Provide the name of your alias and the name of the search index you'd like to map it to and then save the file to create the alias.
48+
1. Naviagate to your search service in the [Azure portal](https://portal.azure.com).
49+
1. Find and select **Aliases**
50+
1. Select **+ Add Aias**
51+
1. Give your index alias a name and select the search index you want to map the alias to. Then, select **Save**.
5352

54-
![Create an alias in VS Code](media/search-howto-alias/create-alias-vscode.png "Create an alias in VS Code")
53+
:::image type="content" source="media/search-howto-alias/create-alias-portal.png" alt-text="Screenshot creating an alias in the Azure portal" border="true":::
54+
55+
### [**.NET SDK**](#tab/sdk)
56+
57+
58+
In the preview [.NET SDK](https://www.nuget.org/packages/Azure.Search.Documents/11.5.0-beta.1) for Azure Cognitive Search, you can use the following syntax to create an index alias.
59+
60+
```csharp
61+
// Create a SearchIndexClient
62+
SearchIndexClient adminClient = new SearchIndexClient(serviceEndpoint, credential);
63+
64+
// Create an index alias
65+
SearchAlias myAlias = new SearchAlias("my-alias", "hotel-quickstart-index");
66+
adminClient.CreateAlias(myAlias);
67+
```
68+
69+
Index Aliases are also supported in the latest preview SDKs for [Java](https://search.maven.org/artifact/com.azure/azure-search-documents/11.6.0-beta.1/jar), [Python](https://pypi.org/project/azure-search-documents/11.4.0b1/), and [JavaScript](https://www.npmjs.com/package/@azure/search-documents/v/11.3.0-beta.8).
5570

5671
---
5772

@@ -75,7 +90,7 @@ POST /indexes/my-alias/docs/search?api-version=2021-04-30-preview
7590
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).
7691

7792
> [!NOTE]
78-
> 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.
93+
> You can only use an alias with [document operations](/rest/api/searchservice/document-operations) or to get and update an index definition. Aliases can't be used to delete an index, can't be used with the Analyze Text API, and can't be used as the `targetIndexName` on an indexer.
7994
8095
## Swap indexes
8196

articles/search/search-limits-quotas-capacity.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ Maximum number of synonym maps varies by tier. Each rule can have up to 20 expan
124124

125125
## Index alias limits
126126

127-
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.
127+
Maximum number of [index aliases](search-how-to-alias.md) varies by tier. In all tiers, the maximum number of aliases is double the maximum number of indexes allowed.
128128

129129
| Resource | Free | Basic | S1 | S2 | S3 | S3-HD |L1 | L2 |
130130
| -------- | -----|------ |----|----|----|-------|---|----|
131-
| Maximum aliases |3 |5 or 15 |50 |200 |200 |1000 per partition or 3000 per service |10 |10 |
131+
| Maximum aliases |6 |10 or 30 |100 |400 |400 |2000 per partition or 6000 per service |20 |20 |
132132

133133
## Data limits (AI enrichment)
134134

0 commit comments

Comments
 (0)