move elasticsearch code in one folder
authorChristian Weiske <cweiske@cweiske.de>
Mon, 7 May 2012 18:47:01 +0000 (20:47 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Mon, 7 May 2012 18:47:01 +0000 (20:47 +0200)
scripts/index.php
src/phorkie/Database.php
src/phorkie/Database/Adapter/Elasticsearch/Indexer.php [moved from src/phorkie/Indexer/Elasticsearch.php with 98% similarity]
src/phorkie/Database/Adapter/Elasticsearch/Search.php [moved from src/phorkie/Search/Elasticsearch.php with 98% similarity]
src/phorkie/Database/Adapter/Elasticsearch/Setup.php [moved from src/phorkie/Database/Setup/Elasticsearch.php with 98% similarity]

index eb328b5..5afbee0 100644 (file)
@@ -39,7 +39,6 @@ $db->getSetup()->setup();
 
 $rs = new Repositories();
 list($repos, $count) = $rs->getList(0, 10000);
-$idx = new Indexer_Elasticsearch();
 foreach ($repos as $repo) {
     echo 'Indexing ' . $repo->id . "\n";
     $idx->addRepo($repo, filectime($repo->gitDir));
index e9a75a1..9854e7c 100644 (file)
@@ -5,17 +5,17 @@ class Database
 {
     public function getSearch()
     {
-        return new Search_Elasticsearch();
+        return new Database_Adapter_Elasticsearch_Search();
     }
 
     public function getIndexer()
     {
-        return new Indexer_Elasticsearch();
+        return new Database_Adapter_Elasticsearch_Indexer();
     }
 
     public function getSetup()
     {
-        return new Database_Setup_Elasticsearch();
+        return new Database_Adapter_Elasticsearch_Setup();
     }
 }
 
@@ -1,7 +1,7 @@
 <?php
 namespace phorkie;
 
-class Indexer_Elasticsearch
+class Database_Adapter_Elasticsearch_Indexer
 {
     public function __construct()
     {
similarity index 98%
rename from src/phorkie/Search/Elasticsearch.php
rename to src/phorkie/Database/Adapter/Elasticsearch/Search.php
index 06a0cfe..88ad4ac 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 namespace phorkie;
 
-class Search_Elasticsearch
+class Database_Adapter_Elasticsearch_Search
 {
     public function __construct()
     {
@@ -1,7 +1,7 @@
 <?php
 namespace phorkie;
 
-class Database_Setup_Elasticsearch
+class Database_Adapter_Elasticsearch_Setup
 {
     public function __construct()
     {