你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

IndexesOperationsExtensions.CreateOrUpdateAsync 方法

定义

重载

CreateOrUpdateAsync(IIndexesOperations, Index, Nullable<Boolean>, SearchRequestOptions, AccessCondition, CancellationToken)

创建新的搜索索引或更新索引(如果已存在)。 https://docs.microsoft.com/rest/api/searchservice/Update-Index

CreateOrUpdateAsync(IIndexesOperations, String, Index, Nullable<Boolean>, SearchRequestOptions, AccessCondition, CancellationToken)

创建新的搜索索引或更新索引(如果已存在)。 https://docs.microsoft.com/rest/api/searchservice/Update-Index

CreateOrUpdateAsync(IIndexesOperations, Index, Nullable<Boolean>, SearchRequestOptions, AccessCondition, CancellationToken)

Source:
IndexesOperationsExtensions.Customization.cs

创建新的搜索索引或更新索引(如果已存在)。 https://docs.microsoft.com/rest/api/searchservice/Update-Index

public static System.Threading.Tasks.Task<Microsoft.Azure.Search.Models.Index> CreateOrUpdateAsync (this Microsoft.Azure.Search.IIndexesOperations operations, Microsoft.Azure.Search.Models.Index index, bool? allowIndexDowntime = default, Microsoft.Azure.Search.Models.SearchRequestOptions searchRequestOptions = default, Microsoft.Azure.Search.Models.AccessCondition accessCondition = default, System.Threading.CancellationToken cancellationToken = default);
static member CreateOrUpdateAsync : Microsoft.Azure.Search.IIndexesOperations * Microsoft.Azure.Search.Models.Index * Nullable<bool> * Microsoft.Azure.Search.Models.SearchRequestOptions * Microsoft.Azure.Search.Models.AccessCondition * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Search.Models.Index>
<Extension()>
Public Function CreateOrUpdateAsync (operations As IIndexesOperations, index As Index, Optional allowIndexDowntime As Nullable(Of Boolean) = Nothing, Optional searchRequestOptions As SearchRequestOptions = Nothing, Optional accessCondition As AccessCondition = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Index)

参数

operations
IIndexesOperations

此扩展方法的操作组。

index
Index

要创建或更新的索引的定义。

allowIndexDowntime
Nullable<Boolean>

允许通过使索引脱机至少几秒钟,将新的分析器、tokenizer、标记筛选器或字符筛选器添加到索引。 这暂时导致索引和查询请求失败。 索引的性能和写入可用性可在更新索引后的几分钟内处于受损状态,对于非常大的索引,持续时间更长。

searchRequestOptions
SearchRequestOptions

操作的其他参数。

accessCondition
AccessCondition

操作的其他参数。

cancellationToken
CancellationToken

取消标记。

返回

已创建或更新的索引。

适用于

CreateOrUpdateAsync(IIndexesOperations, String, Index, Nullable<Boolean>, SearchRequestOptions, AccessCondition, CancellationToken)

Source:
IndexesOperationsExtensions.Customization.cs

创建新的搜索索引或更新索引(如果已存在)。 https://docs.microsoft.com/rest/api/searchservice/Update-Index

public static System.Threading.Tasks.Task<Microsoft.Azure.Search.Models.Index> CreateOrUpdateAsync (this Microsoft.Azure.Search.IIndexesOperations operations, string indexName, Microsoft.Azure.Search.Models.Index index, bool? allowIndexDowntime = default, Microsoft.Azure.Search.Models.SearchRequestOptions searchRequestOptions = default, Microsoft.Azure.Search.Models.AccessCondition accessCondition = default, System.Threading.CancellationToken cancellationToken = default);
static member CreateOrUpdateAsync : Microsoft.Azure.Search.IIndexesOperations * string * Microsoft.Azure.Search.Models.Index * Nullable<bool> * Microsoft.Azure.Search.Models.SearchRequestOptions * Microsoft.Azure.Search.Models.AccessCondition * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Search.Models.Index>
<Extension()>
Public Function CreateOrUpdateAsync (operations As IIndexesOperations, indexName As String, index As Index, Optional allowIndexDowntime As Nullable(Of Boolean) = Nothing, Optional searchRequestOptions As SearchRequestOptions = Nothing, Optional accessCondition As AccessCondition = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Index)

参数

operations
IIndexesOperations

此扩展方法的操作组。

indexName
String

要创建或更新的索引的定义。

index
Index

要创建或更新的索引的定义。

allowIndexDowntime
Nullable<Boolean>

允许通过使索引脱机至少几秒钟,将新的分析器、tokenizer、标记筛选器或字符筛选器添加到索引。 这暂时导致索引和查询请求失败。 索引的性能和写入可用性可在更新索引后的几分钟内处于受损状态,对于非常大的索引,持续时间更长。

searchRequestOptions
SearchRequestOptions

操作的其他参数

accessCondition
AccessCondition

操作的其他参数

cancellationToken
CancellationToken

取消标记。

返回

适用于