我有一个在 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/