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

问题描述 投票:1回答:1

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

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

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

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

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

在这里似乎没有关于计划运行的任何事情

这是Indexer类

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();
}
c# azure azure-search azure-search-.net-sdk
1个回答
0
投票

SDK无法快速连续启动时查看下一个将运行的索引器。如果您想要请求能力,请在Azure Search UserVoice上添加此建议。

© www.soinside.com 2019 - 2024. All rights reserved.