gpt4 book ai didi

c# - 如果我快速连续运行多个 Azure 搜索索引器,是否有办法访问 Azure SDK 中的等待索引器队列?

转载 作者:行者123 更新时间:2023-12-02 07:25:38 26 4
gpt4 key购买 nike

我的应用程序使用了几个搜索,它们是相对较大的搜索,每个搜索有数百万个文档,我希望简单地显示等待在我的应用程序的页面上运行的索引器队列。这样我就可以更好地了解将完成什么以及何时完成,因为我大致知道每个任务需要多长时间。

我能够找到当前正在运行的程序,但找不到尚未在 SDK 中运行的程序。我在 SDK 中进行了一些挖掘,但没有发现任何结果,而且我也没有在文档中看到任何引用它的内容

https://learn.microsoft.com/en-us/rest/api/searchservice/indexer-operations

这似乎不是一个选项,但我不确定为什么它不会

https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.search.models.indexerexecutioninfo?view=azure-dotnet

这里似乎没有任何关于计划运行的内容

这是索引器类

public class Indexer : IResourceWithETag
{
//
// Summary:
// Initializes a new instance of the Indexer class.
public Indexer();
//
// Summary:
// Initializes a new instance of the Indexer class.
//
// Parameters:
// name:
// The name of the indexer.
//
// dataSourceName:
// The name of the datasource from which this indexer reads data.
//
// targetIndexName:
// The name of the index to which this indexer writes data.
//
// description:
// The description of the indexer.
//
// schedule:
// The schedule for this indexer.
//
// parameters:
// Parameters for indexer execution.
//
// fieldMappings:
// Defines mappings between fields in the data source and corresponding target fields
// in the index.
//
// isDisabled:
// A value indicating whether the indexer is disabled. Default is false.
//
// eTag:
// The ETag of the Indexer.
public Indexer(string name, string dataSourceName, string targetIndexName, string description = null, IndexingSchedule schedule = null, IndexingParameters parameters = null, IList<FieldMapping> fieldMappings = null, bool? isDisabled = null, string eTag = null);

//
// Summary:
// Gets or sets the name of the indexer.
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
//
// Summary:
// Gets or sets the description of the indexer.
[JsonProperty(PropertyName = "description")]
public string Description { get; set; }
//
// Summary:
// Gets or sets the name of the datasource from which this indexer reads data.
[JsonProperty(PropertyName = "dataSourceName")]
public string DataSourceName { get; set; }
//
// Summary:
// Gets or sets the name of the index to which this indexer writes data.
[JsonProperty(PropertyName = "targetIndexName")]
public string TargetIndexName { get; set; }
//
// Summary:
// Gets or sets the schedule for this indexer.
[JsonProperty(PropertyName = "schedule")]
public IndexingSchedule Schedule { get; set; }
//
// Summary:
// Gets or sets parameters for indexer execution.
[JsonProperty(PropertyName = "parameters")]
public IndexingParameters Parameters { get; set; }
//
// Summary:
// Gets or sets defines mappings between fields in the data source and corresponding
// target fields in the index.
[JsonProperty(PropertyName = "fieldMappings")]
public IList<FieldMapping> FieldMappings { get; set; }
//
// Summary:
// Gets or sets a value indicating whether the indexer is disabled. Default is false.
[JsonProperty(PropertyName = "disabled")]
public bool? IsDisabled { get; set; }
//
// Summary:
// Gets or sets the ETag of the Indexer.
[JsonProperty(PropertyName = "@odata.etag")]
public string ETag { get; set; }

//
// Summary:
// Validate the object.
//
// Exceptions:
// T:Microsoft.Rest.ValidationException:
// Thrown if validation fails
public virtual void Validate();
}

由于我只关心在任何时间点同时运行多个索引器,而不是按计划运行,因此索引计划不会为我提供所需的信息

//
// Summary:
// Represents a schedule for indexer execution.
public class IndexingSchedule
{
//
// Summary:
// Initializes a new instance of the IndexingSchedule class.
public IndexingSchedule();
//
// Summary:
// Initializes a new instance of the IndexingSchedule class.
//
// Parameters:
// interval:
// The interval of time between indexer executions.
//
// startTime:
// The time when an indexer should start running.
public IndexingSchedule(TimeSpan interval, DateTimeOffset? startTime = null);

//
// Summary:
// Gets or sets the interval of time between indexer executions.
[JsonProperty(PropertyName = "interval")]
public TimeSpan Interval { get; set; }
//
// Summary:
// Gets or sets the time when an indexer should start running.
[JsonProperty(PropertyName = "startTime")]
public DateTimeOffset? StartTime { get; set; }

//
// Summary:
// Validate the object.
//
// Exceptions:
// T:Microsoft.Rest.ValidationException:
// Thrown if validation fails
public virtual void Validate();
}

最佳答案

SDK 无法查看快速连续启动时接下来将运行哪些索引器。如果您想请求执行此操作的能力,请将此建议添加到 Azure Search UserVoice .

关于c# - 如果我快速连续运行多个 Azure 搜索索引器,是否有办法访问 Azure SDK 中的等待索引器队列?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55144446/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com