通过Azure认知搜索监视索引
我们使用 Azure认知搜索为我们的一个应用程序的搜索功能。我们想监视以确保已更新索引。
问题在于我们不使用索引器来更新索引。我们有自定义API,可更新使用 Azure认知搜索的应用程序中调用的索引。
有没有办法监视索引,以便我们知道它们正在更新?例如,跟踪索引的文档计数?如果索引文档计数正在波动,则显然正在更新索引。
我想将此指标添加到Azure仪表板中,因此更喜欢使用内置功能的解决方案。
或其他任何建议也受到欢迎。
We use Azure Cognitive Search for the search functionality for one of our applications. We would like to monitor to ensure that the indexes are being updated.
The problem is that we don't use indexers to update the indexes. We have custom APIs that update the indexes which are called from the application that uses the Azure Cognitive Search.
Is there a way to monitor the indexes so that we know they are being updated? For example keep track of the Document Count for the indexes? If the index Document Counts are fluctuating then clearly the indexes are being updated.
I'd like to add this metric to an Azure dashboard so would prefer a solution that uses the in-built functionality if possible.
Or any other suggestions are welcome too.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此页面提供了有关可用于监控的指标。我在该列表上看到“DocumentsProcessedCount”,这似乎就是您正在寻找的内容,并且文档指出它适用于索引器和直接推送文档(后者是您的场景)。另请查看 https://learn.microsoft.com/azure/search /monitor-azure-cognitive-search 了解有关监视的更多信息。希望这有帮助!
This page gives a great description of the metrics that are available to monitor. I see "DocumentsProcessedCount" on that list which seems to be what you are looking for, and the documentation notes that it works for both indexers and pushing documents directly (the latter is your scenario). Also check out https://learn.microsoft.com/azure/search/monitor-azure-cognitive-search for more information on monitoring. Hope this helps!
我要说的是,当您不使用内置索引器之一时,监视会更容易。由于您使用自定义API推出内容,因此您可以定义如何确定内容是否更新。
不要依靠文档计数。如果添加并删除一个项目,则计数保持不变。
相反,将dateTime属性添加到索引中的项目中。确保在将项目提交给您的一个索引时填充此属性。然后,您可以通过查询和索引来验证该索引是否已更新,并通过最后处理进行排序。响应中的第一项将是您在该索引中拥有的最新项目。
该物品可以年龄一周或几秒钟。您必须实现确定这是否意味着索引更新的逻辑。
I would say that monitoring is easier when you don't use one of the built-in indexers. Since you use custom APIs to push content, it's up to you to define how to determine if the content is updated.
Do not rely on document counts. If you add and remove one item, the count stays the same.
Instead, add a DateTime property called LastProcessed to the items in your index. Make sure you populate this property at the time you submit items to one of your indexes. You can then verify that the index is updated by querying and index, sorting by LastProcessed. The first item in the response will be the latest item you have in that index.
That item can be one week old or a few seconds old. You have to implement the logic that determines if this means that the index is updated.