Azure搜索更新单个文档 [英] Azure Search Updating Individual Documents

查看:52
本文介绍了Azure搜索更新单个文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在各种情况下使用Azure搜索.我们经常需要使用用户进行的更改来更新单个文档.我们需要使这些更改尽快在索引中可见,以使失效时间在合理范围内尽可能短.

We are using Azure Search for various scenarios. We often need to update an individual document with changes that users make. We need to have these changes become visible in our indexes as soon as possible so that the stale time is as short as possible within reason.

处理此问题的最佳策略是什么?我们知道要进行批处理更新,但是我们需要对更改进行更直接的反映.

What is the best strategy to handle this. We know that batch updates is the way to go but we need more immediate reflection of the changes.

文档更新后,索引需要多长时间才能反映出此更改.

Once a document is updated, how long does it take for the index to reflect this change.

非常感谢

推荐答案

如果更新不是很频繁,则可以立即立即更新Azure搜索文档(即使用大小为1的批处理).另一方面,如果更新非常频繁,并且您发现单文档批处理的失败率很高,则将需要建立某种收集器"机制来批处理更新.我的建议是首先做简单的事情:尝试单文档批处理,并在必要时添加批处理逻辑.

If the updates are not very frequent, you can simply update the Azure Search document immediately (that is, using batches of size 1). On the other hand, if the updates are extremely frequent and you notice a high rate of failures with single-document batches, you will need to build some sort of "collector" mechanism to batch up updates. My recommendation would be to do the simple thing first: try single-document batches, and add batching logic if necessary.

更新或新索引的文档会在短暂的延迟(通常范围从几毫秒到1-2秒)后反映在搜索结果中.延迟取决于服务拓扑和索引负载.

Updated or newly indexed documents are reflected in the search results after a short delay, usually ranging from single milliseconds to 1-2 seconds. The delay depends on the service topology and indexing load.

这篇关于Azure搜索更新单个文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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