SearchIndexClient.CreateIndex Method

Definition

Overloads

Name Description
CreateIndex(RequestContent, RequestContext)

[Protocol Method] Creates a new search index.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
CreateIndex(SearchIndex, CancellationToken)

Creates a new search index.

CreateIndex(RequestContent, RequestContext)

Source:
SearchIndexClient.cs

[Protocol Method] Creates a new search index.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual Azure.Response CreateIndex(Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member CreateIndex : Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.CreateIndex : Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
Public Overridable Function CreateIndex (content As RequestContent, Optional context As RequestContext = Nothing) As Response

Parameters

content
RequestContent

The content to send as the body 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

content is null.

Service returned a non-success status code.

Applies to

CreateIndex(SearchIndex, CancellationToken)

Source:
SearchIndexClient.cs
Source:
SearchIndexClient.cs

Creates a new search index.

public virtual Azure.Response<Azure.Search.Documents.Indexes.Models.SearchIndex> CreateIndex(Azure.Search.Documents.Indexes.Models.SearchIndex index, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateIndex : Azure.Search.Documents.Indexes.Models.SearchIndex * System.Threading.CancellationToken -> Azure.Response<Azure.Search.Documents.Indexes.Models.SearchIndex>
override this.CreateIndex : Azure.Search.Documents.Indexes.Models.SearchIndex * System.Threading.CancellationToken -> Azure.Response<Azure.Search.Documents.Indexes.Models.SearchIndex>
Public Overridable Function CreateIndex (index As SearchIndex, Optional cancellationToken As CancellationToken = Nothing) As Response(Of SearchIndex)

Parameters

index
SearchIndex

The definition of the index to create.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

The Response<T> from the server containing the SearchIndex that was created. This may differ slightly from what was passed in since the service may return back fields set to their default values depending on the field type and other properties.

Exceptions

index is null.

Service returned a non-success status code.

Applies to