LetoDMS Community Forum
cron job to update full text Index - Printable Version

+- LetoDMS Community Forum (https://community.letodms.com)
+-- Forum: LetoDMS Support (https://community.letodms.com/forumdisplay.php?fid=4)
+--- Forum: Technical Support (https://community.letodms.com/forumdisplay.php?fid=10)
+--- Thread: cron job to update full text Index (/showthread.php?tid=531)



cron job to update full text Index - AlSchedl - 07-19-2012

Hi there,

in serveral docs to letodms it is mentioned, that it makes sense to regularly update the zend-lucene-driven full text index by cron job.

I tought this would be quite simple by adding a line

0 22 * * 1-5 /usr/bin/php /srv/www/htdocs/letodms/out/out.Indexer.php

to root´s crontab. But calling the script in that way only gives a
PHP Notice: Undefined index: REQUEST_URI in /srv/www/htdocs/letodms/inc/inc.Authentication.php on line 15

What am I missing. Could it be, that there is some environmental thing missing, when calling it that way ?

Any help kindly appreciated.

Alex




RE: cron job to update full text Index - steinm - 07-19-2012

(07-19-2012, 04:44 PM)AlSchedl Wrote: Hi there,

in serveral docs to letodms it is mentioned, that it makes sense to regularly update the zend-lucene-driven full text index by cron job.

I tought this would be quite simple by adding a line

0 22 * * 1-5 /usr/bin/php /srv/www/htdocs/letodms/out/out.Indexer.php

to root´s crontab. But calling the script in that way only gives a
PHP Notice: Undefined index: REQUEST_URI in /srv/www/htdocs/letodms/inc/inc.Authentication.php on line 15

What am I missing. Could it be, that there is some environmental thing missing, when calling it that way ?

out.Indexer.php is supposed to be accessed by a browser. The php notice above is a rather minor problem. The major problem is the fact that you are not authenticated. You had to login and save the cookie first. In a second step you can call out.Indexer.php. It would be easier to take the indexer.php script from the utils directory.

Uwe


RE: cron job to update full text Index - AlSchedl - 07-23-2012

Hello Uwe,

I succeeded in using the script letodms-indexer in the utils directory. This calls indexer.php. I had to manually adjust include paths and require_once statements in indexer.php. Now it seems to do exactly the same as calling out.Indexer.php by browser.
What i didnt notice so far is, that obviously serveral uploaded documents give a -
PHP Notice: iconv(): Detected an illegal character in input string in /srv/www/htdocs/letodms/Zend/Search/Lucene/Analysis/Analyzer/Common/Text.php on line 58

-when updating or rebuilding full text index.

Any suggestions to fix that ?

Regards,
Alex


(07-19-2012, 07:45 PM)steinm Wrote: out.Indexer.php is supposed to be accessed by a browser. The php notice above is a rather minor problem. The major problem is the fact that you are not authenticated. You had to login and save the cookie first. In a second step you can call out.Indexer.php. It would be easier to take the indexer.php script from the utils directory.

Uwe