Solr 提交和优化问题 [英] Solr commit and optimize questions

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

问题描述

我有一个分类广告网站.用户可以投放广告、编辑广告、查看广告等

I have a classifieds website. Users may put ads, edit ads, view ads etc.

每当用户投放广告时,我都会向 Solr 添加一个文档.但是,我不知道何时提交.提交会减慢我阅读的内容.

Whenever a user puts an ad, I am adding a document to Solr. I don't know, however, when to commit it. Commit slows things down from what I have read.

我该怎么做?每 12 小时左右自动提交一次?

How should I do it? Autocommit every 12 hours or so?

另外,我应该如何使用优化来做到这一点?

Also, how should I do it with optimize?

推荐答案

实际上,经常提交和优化会让事情变得很慢.太重了.

Actually, committing often and optimizing makes things really slow. It's too heavy.

经过一天的搜索和阅读,我发现了这一点:

After a day of searching and reading stuff, I found out this:

1- 优化导致索引在被优化时大小加倍,并且使事情变得非常缓慢.

1- Optimize causes the index to double in size while beeing optimized, and makes things really slow.

2- 在每次添加后提交不是一个好主意,最好每天提交几次,然后最多每天只进行一次优化.

2- Committing after each add is NOT a good idea, it's better to commit a couple of times a day, and then make an optimize only once a day at most.

3- 应在 solrconfig.xml 文件中将 Commit 设置为autoCommit",并应根据您的需要对其进行调整.

3- Commit should be set to "autoCommit" in the solrconfig.xml file, and there it should be tuned according to your needs.

这篇关于Solr 提交和优化问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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