共用方式為


SearchIndexClient.DeleteIndex Method

Definition

Overloads

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, 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