索引视图时如何从索引中删除数据? [英] How to remove data from an index when indexing a view?

查看:105
本文介绍了索引视图时如何从索引中删除数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从我的数据库索引视图。当我向表中添加条目时,还会在视图中添加一个条目。索引索引新数据。但是当我从索引中的表中删除此条目时,它仍然存在。如何设置软删除?

我阅读了文档,并说它有必要添加一个字段。我应该自己添加吗?

I index the view from my database. When I add an entry to the table, an entry is also added to the view. Index indexes new data. But when I delete this entry from the table in the index, it remains. How to set up a soft delete?
I read the documentation and it says it is necessary to add a field. Should I add it myself?

推荐答案

嗨安德鲁,

删除从索引中删除指定的文档。请注意,将忽略您在删除操作中指定的任何字段(键字段除外)。如果要从文档中删除单个字段,请使用merge而只需将字段
显式设置为 null 。您可以在这里了解更多

Delete removes the specified document from the index. Note that any field you specify in a delete operation, other than the key field, will be ignored. If you want to remove an individual field from a document, use merge instead and simply set the field explicitly to null. You can learn more here.

希望有所帮助。如果您还有其他问题,请告诉我们。

Hope that helps. Let us know if you have additional questions.


这篇关于索引视图时如何从索引中删除数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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