Solr commit and optimize questions

前端 未结 4 990
情书的邮戳
情书的邮戳 2020-12-07 09:23

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

Whenever a user puts an ad, I am adding a document to Solr. I don\'t know, however, when to

4条回答
  •  一整个雨季
    2020-12-07 09:50

    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- Optimize causes the index to double in size while beeing optimized, and makes things really slow.

    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- Commit should be set to "autoCommit" in the solrconfig.xml file, and there it should be tuned according to your needs.

提交回复
热议问题