Azure API 将端点重定向到另一个搜索服务
Azure API Redirect endpoint to another search service
我有一个 Azure API 设置,它侦听 /* 并将查询发送到 https://name.search.windows.net/indexes/appnames/docs/ 上的搜索服务后端。
我想添加第二个侦听 /filters 的端点并将其指向另一个搜索 https://name.search.windows.net/indexes/appfilters/docs/。
我已经使用 set-backend-service base-url 正确指向第二个搜索服务后端,但仍然使用 url包括 /filters,即 https://name.search.windows.net/indexes/appfilters/docs/filters 而不是 https://name.search.windows.net/indexes/appfilters/docs/.
如何删除过滤器/我用来切换 API 的 uri 的一部分?
您只需使用 rewrite-uri
策略通过在入站部分添加此行来删除它
<rewrite-uri template="/" />
我有一个 Azure API 设置,它侦听 /* 并将查询发送到 https://name.search.windows.net/indexes/appnames/docs/ 上的搜索服务后端。
我想添加第二个侦听 /filters 的端点并将其指向另一个搜索 https://name.search.windows.net/indexes/appfilters/docs/。
我已经使用 set-backend-service base-url 正确指向第二个搜索服务后端,但仍然使用 url包括 /filters,即 https://name.search.windows.net/indexes/appfilters/docs/filters 而不是 https://name.search.windows.net/indexes/appfilters/docs/.
如何删除过滤器/我用来切换 API 的 uri 的一部分?
您只需使用 rewrite-uri
策略通过在入站部分添加此行来删除它
<rewrite-uri template="/" />