SearchIndexClient.DeleteIndexAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| DeleteIndexAsync(String, CancellationToken) |
Deletes a search index and all the documents it contains. |
| DeleteIndexAsync(SearchIndex, Boolean, CancellationToken) |
Deletes a search index and all the documents it contains. |
| DeleteIndexAsync(String, MatchConditions, RequestContext) |
[Protocol Method] Deletes a search index and all the documents it contains. This operation is permanent, with no recovery option. Make sure you have a master copy of your index definition, data ingestion code, and a backup of the primary data source in case you need to re-build the index.
|
| DeleteIndexAsync(String, MatchConditions, CancellationToken) |
Deletes a search index and all the documents it contains. This operation is permanent, with no recovery option. Make sure you have a master copy of your index definition, data ingestion code, and a backup of the primary data source in case you need to re-build the index. |
DeleteIndexAsync(String, CancellationToken)
- Source:
- SearchIndexClient.cs
- Source:
- SearchIndexClient.cs
Deletes a search index and all the documents it contains.
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteIndexAsync(string indexName, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteIndexAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DeleteIndexAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DeleteIndexAsync (indexName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)
Parameters
- indexName
- String
Required. The name of the SearchIndex to delete.
- cancellationToken
- CancellationToken
Optional CancellationToken to propagate notifications that the operation should be canceled.
Returns
The Response from the server.
Exceptions
Thrown when indexName is null.
Thrown when a failure is returned by the Search service.
Applies to
DeleteIndexAsync(SearchIndex, Boolean, CancellationToken)
- Source:
- SearchIndexClient.cs
- Source:
- SearchIndexClient.cs
Deletes a search index and all the documents it contains.
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteIndexAsync(Azure.Search.Documents.Indexes.Models.SearchIndex index, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteIndexAsync : Azure.Search.Documents.Indexes.Models.SearchIndex * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DeleteIndexAsync : Azure.Search.Documents.Indexes.Models.SearchIndex * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DeleteIndexAsync (index As SearchIndex, Optional onlyIfUnchanged As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)
Parameters
- index
- SearchIndex
Required. The SearchIndex to delete.
- onlyIfUnchanged
- Boolean
True to throw a RequestFailedException if the ETag does not match the current service version; otherwise, the current service version will be overwritten.
- cancellationToken
- CancellationToken
Optional CancellationToken to propagate notifications that the operation should be canceled.
Returns
The Response from the server.
Exceptions
Thrown when index is null.
Thrown when a failure is returned by the Search service.
Applies to
DeleteIndexAsync(String, MatchConditions, RequestContext)
- Source:
- SearchIndexClient.cs
[Protocol Method] Deletes a search index and all the documents it contains. This operation is permanent, with no recovery option. Make sure you have a master copy of your index definition, data ingestion code, and a backup of the primary data source in case you need to re-build the index.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteIndexAsync(string indexName, Azure.MatchConditions matchConditions, Azure.RequestContext context);
abstract member DeleteIndexAsync : string * Azure.MatchConditions * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.DeleteIndexAsync : string * Azure.MatchConditions * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DeleteIndexAsync (indexName As String, matchConditions As MatchConditions, context As RequestContext) As Task(Of Response)
Parameters
- indexName
- String
The name of the index.
- matchConditions
- MatchConditions
The content to send as the request conditions of the request.
- context
- RequestContext
The request options, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The response returned from the service.
Exceptions
indexName is null.
indexName is an empty string, and was expected to be non-empty.
Service returned a non-success status code.
Applies to
DeleteIndexAsync(String, MatchConditions, CancellationToken)
- Source:
- SearchIndexClient.cs
Deletes a search index and all the documents it contains. This operation is permanent, with no recovery option. Make sure you have a master copy of your index definition, data ingestion code, and a backup of the primary data source in case you need to re-build the index.
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteIndexAsync(string indexName, Azure.MatchConditions matchConditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteIndexAsync : string * Azure.MatchConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DeleteIndexAsync : string * Azure.MatchConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DeleteIndexAsync (indexName As String, Optional matchConditions As MatchConditions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)
Parameters
- indexName
- String
The name of the index.
- matchConditions
- MatchConditions
The content to send as the request conditions of the request.
- cancellationToken
- CancellationToken
The cancellation token that can be used to cancel the operation.
Returns
Exceptions
indexName is null.
indexName is an empty string, and was expected to be non-empty.
Service returned a non-success status code.