SearchIndexClient.DeleteIndex Method

Definition

Overloads

Name Description
DeleteIndex(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.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
DeleteIndex(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.

DeleteIndex(String, CancellationToken)

Deletes a search index and all the documents it contains.

DeleteIndex(SearchIndex, Boolean, CancellationToken)

Deletes a search index and all the documents it contains.

DeleteIndex(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 Azure.Response DeleteIndex(string indexName, Azure.MatchConditions matchConditions, Azure.RequestContext context);
abstract member DeleteIndex : string * Azure.MatchConditions * Azure.RequestContext -> Azure.Response
override this.DeleteIndex : string * Azure.MatchConditions * Azure.RequestContext -> Azure.Response
Public Overridable Function DeleteIndex (indexName As String, matchConditions As MatchConditions, context As RequestContext) As 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

DeleteIndex(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 Azure.Response DeleteIndex(string indexName, Azure.MatchConditions matchConditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteIndex : string * Azure.MatchConditions * System.Threading.CancellationToken -> Azure.Response
override this.DeleteIndex : string * Azure.MatchConditions * System.Threading.CancellationToken -> Azure.Response
Public Overridable Function DeleteIndex (indexName As String, Optional matchConditions As MatchConditions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As 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.

Applies to

DeleteIndex(String, CancellationToken)

Source:
SearchIndexClient.cs
Source:
SearchIndexClient.cs

Deletes a search index and all the documents it contains.

public virtual Azure.Response DeleteIndex(string indexName, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteIndex : string * System.Threading.CancellationToken -> Azure.Response
override this.DeleteIndex : string * System.Threading.CancellationToken -> Azure.Response
Public Overridable Function DeleteIndex (indexName As String, Optional cancellationToken As CancellationToken = Nothing) As 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

DeleteIndex(SearchIndex, Boolean, CancellationToken)

Source:
SearchIndexClient.cs
Source:
SearchIndexClient.cs

Deletes a search index and all the documents it contains.

public virtual Azure.Response DeleteIndex(Azure.Search.Documents.Indexes.Models.SearchIndex index, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteIndex : Azure.Search.Documents.Indexes.Models.SearchIndex * bool * System.Threading.CancellationToken -> Azure.Response
override this.DeleteIndex : Azure.Search.Documents.Indexes.Models.SearchIndex * bool * System.Threading.CancellationToken -> Azure.Response
Public Overridable Function DeleteIndex (index As SearchIndex, Optional onlyIfUnchanged As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As 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