2 //index repositories in elasticsearch
7 . PATH_SEPARATOR . get_include_path()
11 $file = str_replace(array('\\', '_'), '/', $class) . '.php';
12 if (stream_resolve_include_path($file)) {
17 require_once __DIR__ . '/../data/config.default.php';
18 if (file_exists(__DIR__ . '/../data/config.php')) {
19 require_once __DIR__ . '/../data/config.php';
21 if ($GLOBALS['phorkie']['cfg']['setupcheck']) {
27 $idx = $db->getIndexer();
31 $db->getSetup()->reset();
34 $rs = new Repositories();
35 list($repos, $count) = $rs->getList(0, 10000);
36 foreach ($repos as $repo) {
37 echo 'Indexing ' . $repo->id . "\n";
38 $commits = $repo->getHistory();
39 $first = count($commits)-1;
40 $idx->addRepo($repo, $commits[$first]->committerTime, $commits[0]->committerTime);