2 //index repositories in elasticsearch
7 . PATH_SEPARATOR . get_include_path()
11 $file = str_replace(array('\\', '_'), '/', $class) . '.php';
12 $hdl = @fopen($file, 'r', true);
19 require_once __DIR__ . '/../data/config.default.php';
20 if (file_exists(__DIR__ . '/../data/config.php')) {
21 require_once __DIR__ . '/../data/config.php';
23 if ($GLOBALS['phorkie']['cfg']['setupcheck']) {
29 $idx = $db->getIndexer();
32 echo "Deleting all index data\n";
33 $idx->deleteAllRepos();
37 $db->getSetup()->setup();
40 $rs = new Repositories();
41 list($repos, $count) = $rs->getList(0, 10000);
42 foreach ($repos as $repo) {
43 echo 'Indexing ' . $repo->id . "\n";
44 $idx->addRepo($repo, filectime($repo->gitDir));