gpt4 book ai didi

json - 关于使用 Azure 搜索 Blob 索引器在 Azure 上对 Blob 建立索引的可行性

转载 作者:行者123 更新时间:2023-12-03 05:52:29 30 4
gpt4 key购买 nike

我正在尝试了解 blob 存储。我有两个关于indexing of the blob storage on Azure的问题:我可以创建索引器并按需运行它而不是调度索引器吗?我有以下存储在 blob 中的内容示例:

{  
"Rows":[
{
"RowId":"20211345-2b71-4258-b4a6-4474284d78b5",
"Text":"BIO Vegan Frog Bolognese Sauce 6x225gr",
"Status":2
},
{
"RowId":"28370d6c-5e58-4dda-b874-97ad25cc1361",
"Text":"Gezondheid & Dieet",
"Status":1
},
{
"RowId":"320254f1-2163-48e0-b549-75e818136b48",
"Text":"BIO Vegan Frog Houmous Classic 12x95gr",
"Status":2
},
{
"RowId":"1dfc7fb9-816c-4f35-82f3-bbf83c3d89da",
"Text":"Vegan Producten"
"Status":3
}
],
"Columns":[
"ID",
"Title",
"Status"
],
"BlobName":"115a46d0919e4b6bb7051dce1e766e45"
}

我想在行状态上创建索引,并能够使用索引器检索具有特定状态的行列表。例如搜索 status=2 得到以下结果

{  
"Rows":[
{
"RowId":"20211345-2b71-4258-b4a6-4474284d78b5",
"Text":"BIO Vegan Frog Bolognese Sauce 6x225gr",
"Status":2
},
{
"RowId":"320254f1-2163-48e0-b549-75e818136b48",
"Text":"BIO Vegan Frog Houmous Classic 12x95gr",
"Status":2
}
],
"Columns":[
"ID",
"Title",
"Status"
],
"BlobName":"115a46d0919e4b6bb7051dce1e766e45"
}

我想知道的是这个方案是否可行。

最佳答案

您还有其他需要涵盖的用例吗?如果它们都是基于 JSON,则考虑 Cosmos DB 而不是 Azure 搜索和 Blob 存储。您只需使用一项服务即可获得结果。将 Blob 中的 JSON 存储在文档中,然后您可以使用 API 对其进行查询。 Here is a simple example.

Cosmos DB 允许您选择一致性级别以平衡性能和优化成本。

From the docs:

  • 强:线性化
  • 有界陈旧性:一致的前缀。读取滞后于写入 k 个前缀或 t 间隔
  • session :一致的前缀。单调读取、单调写入、读你所写、写跟随读
  • 一致的前缀:返回的更新是所有更新的一些前缀,没有间隙
  • 最终:读取无序

关于json - 关于使用 Azure 搜索 Blob 索引器在 Azure 上对 Blob 建立索引的可行性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45988671/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com