Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cron job to update full text Index
#1
Question 
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

Reply
#2
(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
Reply
#3
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

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)