16 require(dirname(__FILE__) .
'/bootstrap.inc.php');
23 echo
"Script to rebuild article search index\n"
24 .
"Usage: {$this->scriptName} [options] [journal_path]\n\n"
25 .
"options: The standard index implementation does\n"
26 .
" not support any options. For other\n"
27 .
" implementations please see the corresponding\n"
28 .
" plugin documentation (e.g. 'plugins/generic/\n"
29 .
" lucene/README').\n";
38 while (count($this->argv) && substr($this->argv[0], 0, 1) ==
'-') {
39 $switches[] = array_shift($this->argv);
44 if (count($this->argv)) {
45 $journalPath = array_shift($this->argv);
47 $journal = $journalDao->getByPath($journalPath);
49 die (__(
'search.cli.rebuildIndex.unknownJournal', array(
'journalPath' => $journalPath)).
"\n");
59 $articleSearchIndex->rebuildIndex(
true, $journal, $switches);
68 $baseUrl =& $params[0];