July 17

fix cPanel Solr missed indexes

It is terrible when you recognize that your Solr is not working as it should because it doesn’t have any indexes, nothing…

Okay, if it is not working in the native way, let’s help him by rebuilding the indexes during the night via very simple loop:

for i in `uapi --user=your_cpanel_account Email list_pops_with_disk|grep -w "login:"|awk '{print $2}'`;do doveadm search -u "$i" text "jnk3d9wl2la2jkdsp0p2edscgsdkdsopek";done

Yep, it will go to each email account and search for all emails inside.
I am still not sure why Solr won’t do it as it should in the cPanel build, but okay, we can handle it this way.

related logs:

Solr log:  /home/cpanelsolr/server/logs/solr.log

Dovecot log: /var/log/maillog

Related scripts:

Install Solr from the command line: /scripts/install_dovecot_fts

Rebuild Solr indexes (but it is not working): /scripts/rescan_user_dovecot_fts

Bonus: step by step fix for the error Error: fts_solr: Lookup failed: 500 Server Error

/usr/local/cpanel/3rdparty/scripts/cpanel_dovecot_solr_rebuild_index
/scripts/restartsrv_cpanel_dovecot_solr
/scripts/rescan_user_dovecot_fts

 


Copyright 2021. All rights reserved.

Posted 17 July 2025 by admin in category "simple memo

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.