使用 Azure 存储容器元数据作为搜索过滤器

Use Azure storage container metadata as search filter

有没有办法将 Azure 存储容器上的元数据用作 Azure 认知搜索中的筛选器?

我知道 Azure 存储容器中单个 blob 的元数据可以用作搜索过滤器。

https://docs.microsoft.com/en-us/azure/search/search-howto-indexing-azure-blob-storage#how-azure-cognitive-search-indexes-blobs

User-specified metadata properties present on the blob, if any, are extracted verbatim. Note that this requires a field to be defined in the index with the same name as the metadata key of the blob. For example, if your blob has a metadata key of Sensitivity with value High, you should define a field named Sensitivity in your search index and it will be populated with the value High.

有没有办法在容器级别而不是 blob 级别根据元数据过滤搜索?如果没有,是否有其他方法可以按存储容器过滤搜索?

遗憾的是,我们还不能将 Azure 存储容器上的元数据用作 Azure 认知搜索中的筛选器。

一般这种情况,你可以在feedback上提出你的需求,我看到已经有人想要添加这个功能了,你现在只需要投票即可。

是的,有办法。如果您不使用拉取内容的 built-in 索引器,而是使用 SDK 推送内容,则可以添加所需的任何元数据。他们显然可以成为精炼者。

这意味着您必须编写代码才能从 blob 存储中读取项目。您必须处理更新等逻辑。您无法获得 built-in 索引器给您的好处。但是,您可以控制要包含的元数据。