From the Tiki interface | |
It is possible to rebuild the Unified-Index from a browser. However due to possible timeout during long operation it is recommended to do this ONLY on relatively small Tiki (based on the number and the size of your Tiki objects). For medium to high load sites, it is strongly recommended do that operation from the command line (much less limited), see the next paragraph.
|
From the command line | |
The search index can be rebuilt manually from the command line or you can use the Tiki Scheduler since Tiki17 - see Rebuild the Unified Index with log sample or a Cron job since Tiki9 to runs the command automatically - see Cron Job to Rebuild Search Index. Below are the commands that may be used to rebuild the index. Check Console documentation. Note These commands need to be run as the web server user when using the Lucene implementation, often www-data or nobody depending on your server setup, otherwise the web server cannot update and maintain the index. This means prepending the following commands with "sudo -u www-data ".
Note All commands below assume you are already in the Tiki root directory.
Basic commandCopy to clipboard
Note The syntax "i:r" is equivalent to "index:rebuild".
Multitiki sitesFor multitiki sites, you can rebuild with commands like: Copy to clipboard
Successful rebuildIf the rebuild is successful a message like the following will be produced (for cron jobs, this can usually be sent to you via email as part of automatically running the command): Copy to clipboard
Relations Tracker fieldIf you use the Relations Tracker Field, and are starting from an empty index, you should probably rebuild twice. TroubleshootingIf the rebuild is unsuccessful, instead of the above message you may get a message that indicates there has been an internal server error, or it may say "Rebuild in progress." This may be because the rebuild process uses more memory or takes more time than allowed by the server's php settings. Such settings can be changed on the fly as part of the rebuild command - examples of how to do this are shown below. Not enough memoryIncrease memory limit
Copy to clipboard
You could also direct php to use a specific php.ini file, where there may be a higher memory limit setting or no limit. In this case you would use the -c parameter followed by the path to the php.ini file, as in the example below: Copy to clipboard
Timeout errorIncrease maximum execution time
Copy to clipboard
Force rebuildWhen the rebuild is unsuccessful with a "Rebuild in progress" message, this usually means that the rebuild failed previously in the middle of the process, leaving a temporary folder called temp/unified-index-new on the server. When a new rebuild is started and the program sees this folder, it thinks there is a rebuild already in progress and will stop. You can either delete this folder before rebuilding again or include the --force parameter in the rebuild command as follows: Copy to clipboard
Log to review possible problems with contentCopy to clipboard
Several index_ files in the databaseTypically happening when using the same database over and over you may end with several indexes in your database.
Copy to clipboard
Deprecated Zend_Search_LuceneWith the now deprecated Zend_Search_Lucene, the unified-index is stored in your Tiki directory |
Too many fields | |
alias names for this page
|