从Azure的搜索中获得索引架构 [英] GET Index Schema from Azure Search

查看:240
本文介绍了从Azure的搜索中获得索引架构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在对使用Azure的搜索,使一个角前端的POC。

I'm currently working on a POC that uses Azure Search to make an Angular Front End.

我搜索无处不在,并正在寻找一种方式来查询索引架构。

I've searched everywhere and am looking for a way to query for the index schema.

我是什么意思?在此页面可以使用PUT使用创建索引JSON。

What do I mean by this? On this page you can use a PUT to create an index using JSON.

有没有办法让这个JSON模式回用GET或使用Azure的门户网站?我希望能够以填充与facetable字段的NavBar无需硬code他们。这可能吗?

Is there a way to get this JSON schema back using a GET or using the Azure Portal? I want to be able to populate a NavBar with the facetable fields without having to hard code them. Is this possible?

推荐答案

您可以调用的 获取指数REST API 获得一个索引的模式。

You can call Get Index REST API to get the schema of an Index.

您请求的URL将是:

https://[service name].search.windows.net/indexes/[index name]?api-version=[api-version]

您需要管理​​员键来验证获取指数请求。

您需要解析字段从响应body元素,以获得索引的所有属性的列表。

You will need to parse fields element from the response body to get the list of all attributes of the index.

这篇关于从Azure的搜索中获得索引架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆