SolrJ:禁用自动提交 [英] SolrJ: Disable Autocommit

查看:144
本文介绍了SolrJ:禁用自动提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个Solr实例,我们发现在solrconfig.xml中打开autoCommit实际上可以很好地满足我们的需求.但是,在某些实例和某些批处理操作中,我们要暂时禁用自动提交.我什么都找不到,但是我想知道是否有人通过SolrJ是否可以为某个进程禁用自动提交,然后重新启用它?

We have an instance of Solr, where we've found that turning on autoCommit in the solrconfig.xml actually may serve our needs well. However there are some instances and some batch operations where we want to temporarily disable autocommit. I have not been able to find anything, but I'm wondering if anyone knew if via SolrJ you could disable autocommit for a certain process, and then re-enable it?

推荐答案

您不能禁用和启用自动提交,因为它是在solrconfig.xml中配置的.但是,您可以在solrconfig.xml中将其禁用,并使用 commitWithin作为添加命令,需要自动提交.

You can't disable and enable autocommit as it's configured in solrconfig.xml. However, you can leave it disabled in solrconfig.xml and use commitWithin for those add commands that need autocommit.

这篇关于SolrJ:禁用自动提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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