azure - 是否可以查询 Azure SearchServiceClient 以获取文档属性列表

标签 azure azure-cognitive-search

我有一个在 Azure“搜索服务”上动态创建字段的流程,以及一个使用索引的单独站点。

我希望搜索索引的网站在使用列之前检查该列是否存在,因为使用它会引发异常。

那么有没有办法查询字段定义的索引呢?

最佳答案

我发现 SearchServiceClient 有一个 Get 来获取定义

            var client = new SearchServiceClient(index.IndexSearchServiceName, new SearchCredentials(index.IndexAdminKey));

            var indexDefinition = await client.Indexes.GetAsync(ProductSearchFields.ProductsIndex);

关于azure - 是否可以查询 Azure SearchServiceClient 以获取文档属性列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75095619/

相关文章:

powershell - Azure 自动化错误 'DynamicActivity' : Expected an input parameter value of type

powershell - Azure-SSMS-PowerShell

c# - 为什么我的 Visual Studio 2015 SQL Server 无法与 Azure SQL 数据库连接?

azure - 不同 Azure 站点之间的站点到站点 VPN?

azure - 管理 Azure 搜索 503

c# - 如何在 Azure 中搜索包含引号(转义单引号)的文本?

search - Azure 搜索分层搜索字段

azure - 如何获取ADF管道历史数据

azure - 在 C# 代码中定义 AzureSearch 索引字段映射

Azure 搜索索引器失败并显示错误消息