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();
33 $db->getSetup()->reset();
36 $rs = new Repositories();
37 list($repos, $count) = $rs->getList(0, 10000);
38 foreach ($repos as $repo) {
39 echo 'Indexing ' . $repo->id . "\n";
40 $commits = $repo->getHistory();
41 $first = count($commits)-1;
42 $idx->addRepo($repo, $commits[$first]->committerTime, $commits[0]->committerTime);