首页 > 解决方案 > Azure 索引错误:找到没有类型名称的资源,但未指定预期类型。这是什么意思?

问题描述

我最近在删除索引以重新创建它后开始收到此错误消息。索引定义与删除的索引定义相同,因此我不明白错误的含义。

完整的错误是:

{"error":{"code":"","message":"The request is invalid. Details: indexer : A resource without a type name was found, but no expected type was specified. To allow entries without type information, the expected type must also be specified when the model is specified.\r\n"}}

当我明确删除索引时,找到的“没有类型名称的资源”到底是什么?更重要的是,我该如何解决这个问题???

定义中的每个字段都有指定的名称和类型。

标签: azureazure-functionsmicrosoft-cognitive

解决方案


已解决:该错误非常复杂且具有误导性。问题出在我使用的 Uri 中。

它是https://company-development.search.windows.net/indexers?api-version=2019-05-06

什么时候应该是https://company-development.search.windows.net/indexes?api-version=2019-05-06

我不确定我们公司 Wiki 中发布的 Url 是否包含拼写错误,或者该 Url 在之前的某个时间点是否有效,但使用正确的 Url 解决了问题。


推荐阅读