Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
After you create an index, you can use the Azure portal to access its statistics and definition or remove it from your search service.
This article describes how to manage an index without affecting its content. For guidance on modifying an index definition, see Update or rebuild an index in Azure AI Search.
Limitations
The pricing tier of your search service determines the maximum number and size of your indexes, fields, and documents. For more information, see Service limits in Azure AI Search.
Otherwise, the following limitations apply to index management:
You can't take an index offline for maintenance. Indexes are always available for search operations.
You can't directly copy or duplicate an index within or across search services. However, you can use the backup and restore sample for .NET or Python to achieve similar functionality.
View all indexes
To view all your indexes:
Sign in to the Azure portal and select your search service.
From the left pane, select Search management > Indexes.
By default, the indexes are sorted by name in ascending order. You can sort by Name, Document count, Vector index quota usage, or Total storage size by selecting the corresponding column header.
View an index's statistics
On the index page, the portal provides the following statistics:
- Number of documents in the index.
- Storage space used by the index.
- Vector storage space used by the index.
- Maximum storage space for each index on your search service, which depends on your pricing tier. This value doesn't represent the total storage currently available to the index.
View an index's definition
Each index is defined by fields and optional components that enhance search capabilities, such as analyzers, normalizers, tokenizers, and synonym maps. This definition determines the index's structure and behavior during indexing and querying.
On the index page, select Edit JSON to view its complete definition.
Delete an index
Warning
You can't undo an index deletion. Before you proceed, make sure that you want to permanently remove the index and its documents from your search service.
On the index page, select Delete to initiate the deletion process.
The portal prompts you to confirm the deletion. After you select Delete, check your notifications to confirm that the deletion was successful.
After you create an index, you can use the Azure AI Search REST APIs to access its statistics and definition or remove it from your search service.
This article describes how to manage an index without affecting its content. For guidance on modifying an index definition, see Update or rebuild an index in Azure AI Search.
Limitations
The pricing tier of your search service determines the maximum number and size of your indexes, fields, and documents. For more information, see Service limits in Azure AI Search.
Otherwise, the following limitations apply to index management:
You can't take an index offline for maintenance. Indexes are always available for search operations.
You can't directly copy or duplicate an index within or across search services. However, you can use the backup and restore sample for .NET or Python to achieve similar functionality.
View all indexes
Use Indexes - List (REST API) to retrieve all indexes on your search service.
### List all indexes
GET https://[service name].search.azure.cn/indexes?api-version=[api version]
Content-Type: application/json
api-key: [admin key]
View an index's statistics
Use Indexes - Get Statistics (REST API) to retrieve the document count, storage usage, and vector storage usage of an index.
### Get index statistics
GET https://[service name].search.azure.cn/indexes/[index name]/stats?api-version=[api version]
Content-Type: application/json
api-key: [admin key]
View an index's definition
Each index is defined by fields and optional components that enhance search capabilities, such as analyzers, normalizers, tokenizers, and synonym maps. This definition determines the index's structure and behavior during indexing and querying.
Use Indexes - Get (REST API) to retrieve the JSON definition of an index.
### Get index definition
GET https://[service name].search.azure.cn/indexes/[index name]?api-version=[api version]
Content-Type: application/json
api-key: [admin key]
Delete an index
Warning
You can't undo an index deletion. Before you proceed, make sure that you want to permanently remove the index and its documents from your search service.
Use Indexes - Delete (REST API) to permanently delete an index.
### Delete an index
DELETE https://[service name].search.azure.cn/indexes/[index name]?api-version=[api version]
Content-Type: application/json
api-key: [admin key]
If the index was deleted successfully, you should receive an HTTP/1.1 204 No Content response.
After you create an index, you can use the Azure SDK for .NET, Java, JavaScript, or Python to access its statistics and definition or remove it from your search service.
This article describes how to manage an index without affecting its content. For guidance on modifying an index definition, see Update or rebuild an index in Azure AI Search.
Limitations
The pricing tier of your search service determines the maximum number and size of your indexes, fields, and documents. For more information, see Service limits in Azure AI Search.
Otherwise, the following limitations apply to index management:
You can't take an index offline for maintenance. Indexes are always available for search operations.
You can't directly copy or duplicate an index within or across search services. However, you can use the backup and restore sample for .NET or Python to achieve similar functionality.
View all indexes
Use your preferred Azure SDK to retrieve all indexes on your search service.
The Azure SDK for .NET provides GetIndexesAsync for this task.
// Create a SearchIndexClient
var endpoint = new Uri("[service endpoint]");
var credential = new AzureKeyCredential("[admin key]");
var indexClient = new SearchIndexClient(endpoint, credential);
// List all indexes
await foreach (var index in indexClient.GetIndexesAsync())
{
Console.WriteLine(index.Name);
}
View an index's statistics
Use your preferred Azure SDK to retrieve the document count, storage usage, and vector storage usage of an index.
The Azure SDK for .NET provides GetIndexStatisticsAsync for this task.
// Create a SearchIndexClient
var endpoint = new Uri("[service endpoint]");
var credential = new AzureKeyCredential("[admin key]");
var indexClient = new SearchIndexClient(endpoint, credential);
// Get index statistics
var statsResponse = await indexClient.GetIndexStatisticsAsync("[index name]");
var stats = statsResponse.Value;
Console.WriteLine($"Number of documents: {stats.DocumentCount:N0}");
Console.WriteLine($"Storage consumed by index: {stats.StorageSize:N0} bytes");
Console.WriteLine($"Storage consumed by vectors: {stats.VectorIndexSize:N0} bytes");
View an index's definition
Each index is defined by fields and optional components that enhance search capabilities, such as analyzers, normalizers, tokenizers, and synonym maps. This definition determines the index's structure and behavior during indexing and querying.
Use your preferred Azure SDK to retrieve the JSON definition of an index.
The Azure SDK for .NET provides GetIndexAsync for this task.
// Create a SearchIndexClient
var endpoint = new Uri("[service endpoint]");
var credential = new AzureKeyCredential("[admin key]");
var indexClient = new SearchIndexClient(endpoint, credential);
// Get index definition
var index = await indexClient.GetIndexAsync("[index name]");
string indexJson = JsonSerializer.Serialize(index.Value, new JsonSerializerOptions { WriteIndented = true });
Console.WriteLine(indexJson);
Delete an index
Warning
You can't undo an index deletion. Before you proceed, make sure that you want to permanently remove the index and its documents from your search service.
Use your preferred Azure SDK to permanently delete an index.
The Azure SDK for .NET provides DeleteIndexAsync for this task.
// Create a SearchIndexClient
var endpoint = new Uri("[service endpoint]");
var credential = new AzureKeyCredential("[admin key]");
var indexClient = new SearchIndexClient(endpoint, credential);
// Delete the index
await indexClient.DeleteIndexAsync("[index name]");
Console.WriteLine("Index deleted successfully.");