使用Cosmos Graph DB在Azure Search中使用软删除 [英] Using soft delete in Azure Search with a Cosmos Graph DB

查看:58
本文介绍了使用Cosmos Graph DB在Azure Search中使用软删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Cosmos Graph数据库作为我的数据源在Azure Search上设置软删除功能。 Azure搜索需要数据库中的列来跟踪删除,因此我已经为所有名为'isDeleted'的顶点添加了一个属性,其值为true / false。
但是搜索仍然无法使用此列,因为它在图表中存储为集合而不是简单的名称/值对。

I'm trying to setup the soft delete feature on Azure Search with a Cosmos Graph database as my data source. Azure Search needs a column in the database to track deletes so I've added a property to all my vertices called 'isDeleted' with a true / false value. However Search still can not use this column as it is stored as a collection in the graph rather than a simple name / value pair.

例如。它的存储方式如下:

eg. It is stored like this:


" properties" :{

推荐答案

迈克,

感谢您的详细信息。您能否提供有关特定解决方案的其他详细信息我们将研究这个但是想知道正在使用的特定驱动程序,还是使用REST API for Graph数据库进行Azure搜索?可能存在一些限制
或查询执行方式的问题。 

Thank you for the detail. Can you provide additional detail about your specific solution? We are going to look into this but would like to know the specific driver being used or is Azure Search using REST API for Graph database? There might be some limitations or issues with how the query is being executed. 

如果我们有一个更完整的Json文档示例并且确切的查询被传递,我们会能够快速识别问题。如果存在实现问题,那么了解有关解决方案的更多信息会很高兴,因此我们可以通过重新执行步骤。

If we had a more complete Json document example and the exact query being passed, we would be able identify the issue quickly. If there are implementation issues, it would be nice to know more about the solution so we could go through repro steps.

我将您的示例构建为基于示例Json的示例查询文档。

I took your example an build out an example query based upon an example Json document.

查询以返回"搜索"的所有实例属性为isDeleted = false:

Query to return all instances of "search" with a property of isDeleted = false:

g.V().hasLabel(‘search’).has(‘isDeleted’, ‘false’)


带有"isDeleted"的示例Json文档document property等于false。

Example Json document with a "isDeleted" document property equal to false.

{
	"id": "a344ae8f-5491-40c6-xxx",
	"label": "search",
	"type": "vertex",
	"properties": {
		"isDeleted": [
		{
			"id": "69ca97b-s233w-xxx",
			"value": "false"
		}
]
},

我希望这些信息有用。


这篇关于使用Cosmos Graph DB在Azure Search中使用软删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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